Remove unused ThingManager constructor.

This fixes a warning about exposing ItemStackThingParser outside of its
visibility scope, but really it's just a good little cleanup step, since
the constructor in question is never used for anything. We might want to
eventually expose the ItemStackThingParser and use it in more places in
the code base, but in that case, and in that case it would probably make
sense to re-introduce the constructor, but I'm calling YAGNI on this in
order to nuke a warning.
This commit is contained in:
Andreas Troelsen 2024-01-01 18:23:54 +01:00
parent 82f00c5535
commit eb51a31720
1 changed files with 2 additions and 6 deletions

View File

@ -10,21 +10,17 @@ public class ThingManager implements ThingParser {
private final List<ThingParser> parsers;
private final ItemStackThingParser items;
public ThingManager(MobArena plugin, ItemStackThingParser parser) {
public ThingManager(MobArena plugin) {
parsers = new ArrayList<>();
parsers.add(new CommandThingParser());
parsers.add(new MoneyThingParser(plugin));
parsers.add(new PermissionThingParser(plugin));
parsers.add(new PotionEffectThingParser());
parsers.add(new InventoryThingParser(plugin.getServer()));
items = parser;
items = new ItemStackThingParser();
items.register(new SavedItemParser(plugin));
}
public ThingManager(MobArena plugin) {
this(plugin, new ItemStackThingParser());
}
/**
* Register a new thing parser in the manager.
*