From 037714ab76628e0cb865a65146052b239c197191 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 4 Oct 2018 00:29:01 +0200 Subject: [PATCH 1/3] Possibly fix for searchItem message --- .../com/sk89q/worldedit/command/OptionsCommands.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 ee1db0b6b..949e392d9 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 @@ -264,7 +264,7 @@ public class OptionsCommands { ItemType type = ItemTypes.get(query); if (type != null) { - actor.print(type.getId() + " (" + type.getName() + ")"); + actor.print(BBC.getPrefix() + "#" + type.getId() + " (" + type.getName() + ")"); } else { if (query.length() <= 2) { actor.printError("Enter a longer search string (len > 2)."); @@ -272,21 +272,21 @@ public class OptionsCommands { } if (!blocksOnly && !itemsOnly) { - actor.print("Searching for: " + query); + actor.print(BBC.getPrefix() + "Searching for: " + query); } else if (blocksOnly && itemsOnly) { actor.printError("You cannot use both the 'b' and 'i' flags simultaneously."); return; } else if (blocksOnly) { - actor.print("Searching for blocks: " + query); + actor.print(BBC.getPrefix() + "Searching for blocks: " + query); } else { - actor.print("Searching for items: " + query); + actor.print(BBC.getPrefix() + "Searching for items: " + query); } int found = 0; for (ItemType searchType : ItemTypes.values) { if (found >= 15) { - actor.print("Too many results!"); + 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(searchType.getId() + " (" + searchType.getName() + ")"); + actor.print(BBC.getPrefix() + "#" + type.getId() + " (" + type.getName() + ")"); ++found; break; } From a26cf574de63d8e4402ab0d42b4317ce84b00fd0 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 4 Oct 2018 00:44:00 +0200 Subject: [PATCH 2/3] Warn before update restart --- worldedit-core/src/main/java/com/boydti/fawe/util/Updater.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/Updater.java b/worldedit-core/src/main/java/com/boydti/fawe/util/Updater.java index 171fb4a9d..19fe646fd 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/Updater.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/Updater.java @@ -46,7 +46,7 @@ public class Updater { Fawe.debug("Updated FAWE to " + versionString + " @ " + pendingFile); String url = "https://empcraft.com/fawe/cl?" + Integer.toHexString(Fawe.get().getVersion().hash); new Message().prefix().text("A FAWE update is available:") - .text("\n&8 - &a/fawe update &8 - &7Update the plugin") + .text("\n&8 - &a/fawe update &8 - &7Updates the plugin and restarts the server to apply the changes") .cmdTip("fawe update") .text("\n&8 - &a/fawe changelog") .cmdTip("fawe changelog") From 5896b2eba4f202a977e9b1f0acb7d6b764fc2845 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 4 Oct 2018 01:12:29 +0200 Subject: [PATCH 3/3] Typo fix and neatify --- .../main/java/com/sk89q/worldedit/world/block/BlockState.java | 2 +- .../main/java/com/sk89q/worldedit/world/block/BlockTypes.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java index f06f8fb6b..017c988cc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java @@ -108,7 +108,7 @@ public abstract class BlockState implements BlockStateHolder { type = BlockTypes.get(key); if (type == null) { String input = key.toString(); - throw new SuggestInputParseException("Unkown block for " + input, input, () -> Stream.of(BlockTypes.values) + throw new SuggestInputParseException("Does not match a valid block type: " + input, input, () -> Stream.of(BlockTypes.values) .filter(b -> b.getId().contains(input)) .map(e1 -> e1.getId()) .collect(Collectors.toList()) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java index 2d14f2695..ab4c3bd0f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java @@ -1055,7 +1055,7 @@ public enum BlockTypes implements BlockType { } catch (NumberFormatException e) { } catch (IndexOutOfBoundsException e) {} - throw new SuggestInputParseException("Unkown block for " + inputLower, inputLower, () -> Stream.of(BlockTypes.values) + throw new SuggestInputParseException("Does not match a valid block type: " + inputLower, inputLower, () -> Stream.of(BlockTypes.values) .filter(b -> b.getId().contains(inputLower)) .map(e1 -> e1.getId()) .collect(Collectors.toList())