From d26e7e142f101f1cedf07f25cea7e278a972958e Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sat, 13 Apr 2019 16:13:19 +0200 Subject: [PATCH] Fixes #15 --- .../java/com/sk89q/worldedit/command/GeneralCommands.java | 4 ++-- .../java/com/sk89q/worldedit/command/OptionsCommands.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java index a212a76f3..954281c67 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java @@ -253,7 +253,7 @@ public class GeneralCommands { int found = 0; - for (ItemType searchType : ItemTypes.values()) { + for (ItemType searchType : ItemType.REGISTRY) { if (found >= 15) { actor.print(BBC.getPrefix() + "Too many results!"); break; @@ -269,7 +269,7 @@ public class GeneralCommands { for (String alias : Sets.newHashSet(searchType.getId(), searchType.getName())) { if (alias.contains(query)) { - actor.print(searchType.getId() + " (" + searchType.getName() + ")"); + actor.print(BBC.getPrefix() + searchType.getId() + " (" + searchType.getName() + ")"); ++found; break; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/OptionsCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/OptionsCommands.java index ee2cbfe15..cefd48a4a 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/OptionsCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/OptionsCommands.java @@ -284,7 +284,7 @@ public class OptionsCommands { int found = 0; - for (ItemType searchType : ItemTypes.values()) { + for (ItemType searchType : ItemType.REGISTRY) { if (found >= 15) { actor.print(BBC.getPrefix() + "Too many results!"); break; @@ -300,7 +300,7 @@ public class OptionsCommands { for (String alias : Sets.newHashSet(searchType.getId(), searchType.getName())) { if (alias.contains(query)) { - actor.print(BBC.getPrefix() + "#" + type.getId() + " (" + type.getName() + ")"); + actor.print(BBC.getPrefix() + searchType.getId() + " (" + searchType.getName() + ")"); ++found; break; }