SteamWar/BauSystem
Archiviert
13
0

Rename GuiTraceShow inventory name

Dieser Commit ist enthalten in:
jojo 2021-01-26 12:06:01 +01:00
Ursprung 38b545483a
Commit 41c5b3dd55

Datei anzeigen

@ -39,16 +39,20 @@ import java.util.Map;
public class GuiTraceShow {
private static final Map<Player, ShowModeParameter> SHOW_MODE_PARAMETER_HASH_MAP = new HashMap<>();
private static final Map<Player, ShowModeParameter> ShowModeParameterMap = new HashMap<>();
private GuiTraceShow() {
}
public static void openGui(Player player) {
ShowModeParameter playerShowMode = new ShowModeParameter();
playerShowMode.setInterpolate_Y(false);
playerShowMode.setInterpolate_XZ(false);
SHOW_MODE_PARAMETER_HASH_MAP.put(player, playerShowMode);
ShowModeParameterMap.put(player, playerShowMode);
SWInventory swInventory = new SWInventory(player, 9, BauSystem.PREFIX + "ShowGUI");
swInventory.addCloseCallback(clickType -> SHOW_MODE_PARAMETER_HASH_MAP.remove(player));
SWInventory swInventory = new SWInventory(player, 9, "Trace Show GUI");
swInventory.addCloseCallback(clickType -> ShowModeParameterMap.remove(player));
SWItem trace_show = new SWItem(Material.LIME_CONCRETE, "§aTraces Angezeigt", new ArrayList<>(), false, clickType -> {});
SWItem trace_hide = new SWItem(Material.RED_CONCRETE, "§cTraces Ausgeblendet", new ArrayList<>(), false, clickType -> {});
@ -91,7 +95,7 @@ public class GuiTraceShow {
}
private static void toggleHideTNTinWaterExploded(Player player, SWInventory swInventory, SWItem swItem) {
ShowModeParameter showModeParameter = SHOW_MODE_PARAMETER_HASH_MAP.get(player);
ShowModeParameter showModeParameter = ShowModeParameterMap.get(player);
showModeParameter.setWater(!showModeParameter.isWater());
show(player);
@ -101,7 +105,7 @@ public class GuiTraceShow {
}
private static void toggleInterpolateYPosition(Player player, SWInventory swInventory, SWItem swItem) {
ShowModeParameter showModeParameter = SHOW_MODE_PARAMETER_HASH_MAP.get(player);
ShowModeParameter showModeParameter = ShowModeParameterMap.get(player);
showModeParameter.setInterpolate_Y(!showModeParameter.isInterpolate_Y());
show(player);
@ -111,7 +115,7 @@ public class GuiTraceShow {
}
private static void toggleInterpolateXZPosition(Player player, SWInventory swInventory, SWItem swItem) {
ShowModeParameter showModeParameter = SHOW_MODE_PARAMETER_HASH_MAP.get(player);
ShowModeParameter showModeParameter = ShowModeParameterMap.get(player);
showModeParameter.setInterpolate_XZ(!showModeParameter.isInterpolate_XZ());
show(player);
@ -121,7 +125,7 @@ public class GuiTraceShow {
}
private static void show(Player player) {
ShowModeParameter showModeParameter = SHOW_MODE_PARAMETER_HASH_MAP.get(player);
ShowModeParameter showModeParameter = ShowModeParameterMap.get(player);
ShowMode showMode;
if (showModeParameter.isAdvanced()) {
showMode = new Advanced(player, showModeParameter);