8000 Fix missing dependency on shop module by Pablete1234 · Pull Request #1079 · PGMDev/PGM · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix missing dependency on shop module #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions core/src/main/java/tc/oc/pgm/shops/ShopModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import org.jdom2.Document;
import org.jdom2.Element;
import tc.oc.pgm.action.Action;
import tc.oc.pgm.action.ActionModule;
import tc.oc.pgm.action.ActionParser;
import tc.oc.pgm.api.filter.Filter;
import tc.oc.pgm.api.map.MapModule;
import tc.oc.pgm.api.map.MapTag;
import tc.oc.pgm.api.map.factory.MapFactory;
import tc.oc.pgm.api.map.factory.MapModuleFactory;
import tc.oc.pgm.api.match.Match;
import tc.oc.pgm.api.match.MatchModule;
import tc.oc.pgm.api.player.MatchPlayer;
import tc.oc.pgm.filters.matcher.StaticFilter;
import tc.oc.pgm.filters.parse.FilterParser;
Expand All @@ -50,7 +50,7 @@
import tc.oc.pgm.util.xml.Node;
import tc.oc.pgm.util.xml.XMLUtils;

public class ShopModule implements MapModule {
public class ShopModule implements MapModule<ShopMatchModule> {

private static final Collection<MapTag> TAGS =
ImmutableList.of(new MapTag("shops", "Shops", false, true));
Expand All @@ -64,7 +64,7 @@ public ShopModule(Map<String, Shop> shops, Set<ShopKeeper> keepers) {
}

@Override
public MatchModule createMatchModule(Match match) {
public ShopMatchModule createMatchModule(Match match) {
return new ShopMatchModule(match, shops, shopKeepers);
}

Expand All @@ -75,6 +75,11 @@ public Collection<MapTag> getTags() {

public static class Factory implements MapModuleFactory<ShopModule> {

@Override
public Collection<Class<? extends MapModule>> getWeakDependencies() {
return ImmutableList.of(ActionModule.class);
}

@Override
public ShopModule parse(MapFactory factory, Logger logger, Document doc)
throws InvalidXMLException {
Expand Down
0