From b2c00035702fc36d0ca5fbccbef9264e93aed746 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 28 Dec 2021 14:05:18 +0100 Subject: [PATCH] Hotfix Help 'n' more Signed-off-by: Chaoscaot --- .../de/steamwar/schematicsystem/commands/GUI.java | 2 +- .../schematicsystem/commands/SchematicCommand.java | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java index d3c96ab..ea47d1b 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java @@ -149,7 +149,7 @@ public class GUI { if(!type.isAssignable()) continue; - SWItem item = new SWItem(SWItem.getMaterial("STONE_BUTTON"), type.name()); + SWItem item = new SWItem(type.getMaterial(), type.name()); if(type.fightType()) item.setEnchanted(true); diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index 64995df..addd228 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -48,17 +48,17 @@ public class SchematicCommand extends SWCommand { super("schematic", Bukkit.getPluginManager().getPlugin("Teamserver") == null ? new String[]{"schem", "/schem", "/schematic"} : new String[]{"schem"}); } + @Register("help") + public void pagedHelp(Player player, HelpPage page) { + printHelpPage(player, page); + } + @Register(help = true) @Register("help") public void genericHelp(Player player, String... args) { printHelpMainPage(player); } - @Register("help") - public void pagedHelp(Player player, HelpPage page) { - printHelpPage(player, page); - } - @Register("gui") public void gui(Player player) { GUI.list(player); @@ -135,6 +135,10 @@ public class SchematicCommand extends SWCommand { @Register("save") @Register("s") public void saveSchem(Player player, @Mapper("dirStringMapper") String name) { + if (name.endsWith("/")) { + player.sendMessage(SchematicSystem.PREFIX + "§cDu must auch einen Namen für die Schematic nach dem Ordner angeben"); + return; + } SteamwarUser user = getUser(player); if (name.startsWith("/")) name = name.substring(1); String[] layers = name.split("/");