diff --git a/src/main/java/net/aufdemrand/denizen/listeners/core/ItemListenerInstance.java b/src/main/java/net/aufdemrand/denizen/listeners/core/ItemListenerInstance.java index 3589e5a12a..96d806f149 100644 --- a/src/main/java/net/aufdemrand/denizen/listeners/core/ItemListenerInstance.java +++ b/src/main/java/net/aufdemrand/denizen/listeners/core/ItemListenerInstance.java @@ -36,17 +36,17 @@ public enum ItemType { CRAFT, SMELT, FISH } @Override public void onBuild(List args) { - + for (aH.Argument arg : args) { - - if (arg.matchesEnum(ItemType.values()) && type == null) + + if (arg.matchesEnum(ItemType.values()) && type == null) this.type = ItemType.valueOf(arg.getValue().toUpperCase()); - - else if (arg.matchesPrefix("qty, q") + + else if (arg.matchesPrefix("qty, q") && arg.matchesPrimitive(aH.PrimitiveType.Integer)) this.required = aH.getIntegerFrom(arg.getValue()); - - else if (arg.matchesPrefix("items, item, i, name, names")) + + else if (arg.matchesPrefix("items, item, i, name, names")) items = arg.asType(dList.class); else if (arg.matchesPrefix("region, r")) @@ -67,7 +67,7 @@ else if (arg.matchesPrefix("cuboid, c") } public void increment(String object, int amount) { - items_so_far = items_so_far + amount; + items_so_far = items_so_far + amount; dB.echoDebug(ChatColor.YELLOW + "// " + player.getName() + " " + type.toString().toLowerCase() + "ed " + amount + " " + object + "."); check(); @@ -75,7 +75,7 @@ public void increment(String object, int amount) { @EventHandler public void listenItem(InventoryClickEvent event) { - + // Proceed if the slot clicked is a RESULT slot and the player is the right one if (event.getSlotType().toString().equals("RESULT") && event.getWhoClicked() == player.getPlayerEntity()) { @@ -138,7 +138,7 @@ public void run() { @EventHandler public void listenFish(PlayerFishEvent event) { - // Only continue if the event is an event for the player that owns this listener. + // Only continue if the event is an event for the player that owns this listener. if (event.getPlayer() != player.getPlayerEntity()) return; // If REGION argument specified, check. If not in region, don't count kill! diff --git a/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandRegistry.java b/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandRegistry.java index 733bd1f640..ce826465e5 100644 --- a/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandRegistry.java +++ b/src/main/java/net/aufdemrand/denizen/scripts/commands/CommandRegistry.java @@ -55,175 +55,175 @@ public T get(Class clazz) { @Override public void registerCoreMembers() { - // <--[command] - // @Name Anchor - // @Usage anchor [id:] [assume/add/remove/walkto/walknear] (range:<#>) - // @Required 2 - // @Stable Stable - // @Short TODO - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Anchor + // @Usage anchor [id:] [assume/add/remove/walkto/walknear] (range:<#>) + // @Required 2 + // @Stable Stable + // @Short TODO + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(AnchorCommand.class, "ANCHOR", "anchor [id:] [assume/add/remove/walkto/walknear] (range:<#>)", 2); - // <--[command] - // @Name Animate - // @Usage animate [|...] [animation:] - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Animate + // @Usage animate [|...] [animation:] + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(AnimateCommand.class, "ANIMATE", "animate [|...] [animation:]", 1); - // <--[command] - // @Name AnimateChest - // @Usage animatechest [] ({open}/close) (sound:{true}/false) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name AnimateChest + // @Usage animatechest [] ({open}/close) (sound:{true}/false) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(AnimateChestCommand.class, "ANIMATECHEST", "animatechest [] ({open}/close) (sound:{true}/false)", 1); - // <--[command] - // @Name Announce - // @Usage announce [""] (to_ops) (to_flagged:) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Announce + // @Usage announce [""] (to_ops) (to_flagged:) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(AnnounceCommand.class, "ANNOUNCE", "announce [\"\"] (to_ops) (to_flagged:)", 1); - // <--[command] - // @Name Assignment - // @Usage assignment [{set}/remove] (script:) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Assignment + // @Usage assignment [{set}/remove] (script:) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(AssignmentCommand.class, "ASSIGNMENT", "assignment [{set}/remove] (script:)", 1); - // <--[command] - // @Name Attack - // @Usage attack (cancel) (|...) (target:) - // @Required 0 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Attack + // @Usage attack (cancel) (|...) (target:) + // @Required 0 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(AttackCommand.class, "ATTACK", "attack (cancel) (|...) (target:)", 0); - // <--[command] - // @Name Break - // @Usage break [] (entity:) (radius:<#.#>) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Break + // @Usage break [] (entity:) (radius:<#.#>) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(BreakCommand.class, "BREAK", "break [] (entity:) (radius:<#.#>)", 1); - // <--[command] - // @Name Burn - // @Usage burn [|...] (duration:) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Burn + // @Usage burn [|...] (duration:) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(BurnCommand.class, "BURN", "burn [|...] (duration:)", 1); - // <--[command] - // @Name Cast, Potion - // @Usage cast [] (remove) (duration:) (power:<#>) (|...) - // @Required 1 - // @Stable Stable - // @Short Casts a potion effect to a list of entities. - // @Author aufdemrand/Jeebiss/Morphan1 + // <--[command] + // @Name Cast, Potion + // @Usage cast [] (remove) (duration:) (power:<#>) (|...) + // @Required 1 + // @Stable Stable + // @Short Casts a potion effect to a list of entities. + // @Author aufdemrand/Jeebiss/Morphan1 // - // @Description + // @Description // Casts or removes a potion effect to or from a list of entities. If you don't specify a duration, // it defaults to 60 seconds. If you don't specify a power level, it defaults to 1. // - // @Tags + // @Tags // ]> will return true if the entity has an effect. // - // @Usage - // Use to apply an effect to an entity + // @Usage + // Use to apply an effect to an entity // - potion jump d:120 p:3 // - narrate "You have been given the temporary ability to jump like a kangaroo." // @@ -233,66 +233,66 @@ public void registerCoreMembers() { // - potion jump remove // } // - // @Example TODO + // @Example TODO // - // --> + // --> registerCoreMember(CastCommand.class, "CAST, POTION", "cast [] (remove) (duration:) (power:<#>) (|...)", 1); - // <--[command] - // @Name Chat - // @Usage chat [""] (targets:|...) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Chat + // @Usage chat [""] (targets:|...) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(ChatCommand.class, "CHAT", "chat [\"\"] (targets:|...)", 1); - // <--[command] - // @Name ChunkLoad - // @Usage chunkload ({add}/remove/removeall) [] (duration:) - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name ChunkLoad + // @Usage chunkload ({add}/remove/removeall) [] (duration:) + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(ChunkLoadCommand.class, "CHUNKLOAD", "chunkload ({add}/remove/removeall) [] (duration:)", 1); - // <--[command] - // @Name Compass - // @Usage compass [] - // @Required 1 - // @Stable Todo - // @Short Todo - // @Author Todo - // @Description - // Todo - // @Tags - // Todo - // @Usage - // Todo - // @Example - // Todo - // --> + // <--[command] + // @Name Compass + // @Usage compass [] + // @Required 1 + // @Stable Todo + // @Short Todo + // @Author Todo + // @Description + // Todo + // @Tags + // Todo + // @Usage + // Todo + // @Example + // Todo + // --> registerCoreMember(CompassCommand.class, "COMPASS", "compass []", 1); @@ -338,50 +338,50 @@ public void registerCoreMembers() { "COOLDOWN", "cooldown [] (global) (s: