From eb51a31720add52491b2f5913a1f826aba885236 Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Mon, 1 Jan 2024 18:23:54 +0100 Subject: [PATCH] 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. --- .../com/garbagemule/MobArena/things/ThingManager.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/garbagemule/MobArena/things/ThingManager.java b/src/main/java/com/garbagemule/MobArena/things/ThingManager.java index f28d6c4..d94a2d8 100644 --- a/src/main/java/com/garbagemule/MobArena/things/ThingManager.java +++ b/src/main/java/com/garbagemule/MobArena/things/ThingManager.java @@ -10,21 +10,17 @@ public class ThingManager implements ThingParser { private final List 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. *