From f78927c50a7fea02468267b33925e03d3ab1958e Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 20 Aug 2022 12:22:58 +0200 Subject: [PATCH 1/2] Hotfix: Schematic GUI --- SchematicSystem_Core/src/SchematicSystem.properties | 4 ++-- .../src/de/steamwar/schematicsystem/commands/GUI.java | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/SchematicSystem_Core/src/SchematicSystem.properties b/SchematicSystem_Core/src/SchematicSystem.properties index bb175b7..f33f5c0 100644 --- a/SchematicSystem_Core/src/SchematicSystem.properties +++ b/SchematicSystem_Core/src/SchematicSystem.properties @@ -1,8 +1,8 @@ PREFIX=§eSchematic§8» §7 ON=§aon OFF=§coff -CHANGE=§7change -CLICK=§7click +CHANGE=§7To change +CLICK=§7Click CURRENT=§7Current: {0} CONFIRM=§aConfirm CANCEL=§cCancel diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java index a2de41e..c2ccbf3 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java @@ -19,12 +19,10 @@ package de.steamwar.schematicsystem.commands; -import de.steamwar.core.Core; import de.steamwar.inventory.*; import de.steamwar.schematicsystem.SafeSchematicNode; import de.steamwar.schematicsystem.SchematicSystem; import de.steamwar.sql.*; -import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; @@ -84,7 +82,7 @@ public class GUI { changeItem(player, node, back); }); if(!node.isDir()) { - inv.setItem(6, SWItem.getMaterial("CAULDRON_ITEM"), SchematicSystem.MESSAGE.parse("GUI_INFO_TYPE", player, mat.name()), Arrays.asList(SchematicSystem.MESSAGE.parse("CHANGE", player), SchematicSystem.MESSAGE.parse("CLICK", player)), node.getSchemtype().fightType(), click -> { + inv.setItem(6, node.getSchemtype().getMaterial(), SchematicSystem.MESSAGE.parse("GUI_INFO_TYPE", player, node.getSchemtype().name()), Arrays.asList(SchematicSystem.MESSAGE.parse("CHANGE", player), SchematicSystem.MESSAGE.parse("CLICK", player)), node.getSchemtype().fightType(), click -> { changeType(player, node); }); inv.setItem(7, SWItem.getMaterial("MAGENTA_GLAZED_TERRACOTTA"), SchematicSystem.MESSAGE.parse("GUI_INFO_DOWNLOAD", player), click -> { From 9914c029e584a43b859c63c8531a5acd81ce86a1 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 20 Aug 2022 12:55:08 +0200 Subject: [PATCH 2/2] Remove Own Player in Addteam --- .../de/steamwar/schematicsystem/commands/SchematicCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java index f243ebd..0c3d9d5 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommand.java @@ -486,7 +486,7 @@ public class SchematicCommand extends SWCommand { return; } - addMember(player, node, team.getMembers().stream().map(SteamwarUser::get).toArray(SteamwarUser[]::new)); + addMember(player, node, team.getMembers().stream().map(SteamwarUser::get).filter(steamwarUser -> steamwarUser.getId() != user.getId()).toArray(SteamwarUser[]::new)); } @Register("delteam")