From a8d68ddd7e5fe940f8820432824f49aeafa13bab Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 7 Mar 2023 16:27:22 +0100 Subject: [PATCH] Minor Fixes --- SchematicSystem_Core/src/SchematicSystem_de.properties | 2 +- .../schematicsystem/commands/schematiccommand/GUI.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SchematicSystem_Core/src/SchematicSystem_de.properties b/SchematicSystem_Core/src/SchematicSystem_de.properties index e3c1d9a..e135cc4 100644 --- a/SchematicSystem_Core/src/SchematicSystem_de.properties +++ b/SchematicSystem_Core/src/SchematicSystem_de.properties @@ -124,7 +124,7 @@ COMMAND_DIR_DONE=§7Ordner §e{0} §7erstellt COMMAND_CHANGE_TYPE_SELECT=§eTyp auswählen COMMAND_MOVE_RECURSIVE=§cDas gibt nur Fehler, vertrau mir COMMAND_MOVE_DONE=§7Die Schematic ist nun unter §e{0} §7zu finden -COMMAND_RENAME_DONE=§7Die Schematic heist nun §e{0} +COMMAND_RENAME_DONE=§7Die Schematic heißt nun §e{0} COMMAND_ADD_TEAM_NOT_IN_TEAM=§cDu bist in keinem Team COMMAND_DEL_TEAM_NOT_IN_TEAM=§cDu bist in keinem Team COMMAND_DEL_TEAM_NONE=§7Es wurde kein Spieler entfernt diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java index 3efb32b..cd953ed 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/GUI.java @@ -161,7 +161,7 @@ public class GUI { anvilInv.setCallback(s -> { SafeSchematicNode.Result result = SafeSchematicNode.setName(user, node, s); if(result.isSuccessful()) { - info(player, node, back); + info(player, SchematicNode.byIdAndUser(user, node.getId()), back); } else { result.sendError(player); } @@ -169,9 +169,11 @@ public class GUI { setCloseLeftCallback(anvilInv, () -> info(player, node, back)); anvilInv.open(); }); - inv.setItem(17, SWItem.getDye(1), (byte) 1, SchematicSystem.MESSAGE.parse("GUI_INFO_DELETE", player), click -> { - delete(player, node, back); - }); + if(node.getOwner() != 0) { + inv.setItem(17, SWItem.getDye(1), (byte) 1, SchematicSystem.MESSAGE.parse("GUI_INFO_DELETE", player), click -> { + delete(player, node, back); + }); + } }else{ if(!node.isDir()) { inv.setItem(4, SWItem.getMaterial("CAULDRON_ITEM"), SchematicSystem.MESSAGE.parse("GUI_INFO_TYPE", player, node.getSchemtype().name()), Collections.emptyList(), node.getSchemtype().fightType(), click -> {});