From a2e677b36938267525d719fa6d94cfc7f3e93ee8 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 18 Apr 2021 01:33:41 +0200 Subject: [PATCH] Fix Naming in TNTSimulator --- .../bausystem/features/simulator/SimulatorEntity_15.java | 4 ++-- .../steamwar/bausystem/features/simulator/Simulator_15.java | 4 ++-- .../steamwar/bausystem/features/simulator/TNTSimulator.java | 4 +++- .../features/simulator/show/SimulatorEntityShowMode.java | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java b/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java index 6e10e2b1..87810907 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java @@ -30,8 +30,8 @@ class SimulatorEntity_15 extends BaseEntity_15 implements AbstractSimulatorEntit private ReferenceCounter referenceCounter = new ReferenceCounter(); - public SimulatorEntity_15(World world, Vector position, boolean tnt) { - super(world, position, tnt ? Material.TNT : Material.WHITE_STAINED_GLASS); + public SimulatorEntity_15(World world, Vector position, boolean highlight) { + super(world, position, highlight ? Material.TNT : Material.WHITE_STAINED_GLASS); this.setNoGravity(true); this.ticksLived = -12000; diff --git a/BauSystem_15/src/de/steamwar/bausystem/features/simulator/Simulator_15.java b/BauSystem_15/src/de/steamwar/bausystem/features/simulator/Simulator_15.java index c593dbcd..22504db2 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/features/simulator/Simulator_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/features/simulator/Simulator_15.java @@ -24,8 +24,8 @@ import org.bukkit.util.Vector; public class Simulator_15 { - public static AbstractSimulatorEntity create(World world, Vector tntPosition, boolean tnt) { - return new SimulatorEntity_15(world, tntPosition, tnt); + public static AbstractSimulatorEntity create(World world, Vector tntPosition, boolean highlight) { + return new SimulatorEntity_15(world, tntPosition, highlight); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java index ee8ab535..e504b182 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java @@ -22,6 +22,8 @@ package de.steamwar.bausystem.features.simulator; import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.SWUtils; +import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.features.simulator.show.SimulatorEntityShowMode; import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWInventory; @@ -94,7 +96,7 @@ public class TNTSimulator { cursor = SimulatorEntityShowMode.createEntity(player, entity.position, false); cursor.display(player); - player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("§ePosition bearbeiten")); + SWUtils.sendToActionbar(player, ColorConfig.HIGHLIGHT + "Position bearbeiten"); return; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/show/SimulatorEntityShowMode.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/show/SimulatorEntityShowMode.java index 8a2ae390..be6034a3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/show/SimulatorEntityShowMode.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/show/SimulatorEntityShowMode.java @@ -48,8 +48,8 @@ public class SimulatorEntityShowMode implements ShowMode { entity.display(player); } - public static AbstractSimulatorEntity createEntity(Player player, Vector position, boolean tnt) { - return VersionedCallable.call(new VersionedCallable<>(() -> Simulator_15.create(player.getWorld(), position, tnt), 15)); + public static AbstractSimulatorEntity createEntity(Player player, Vector position, boolean highlight) { + return VersionedCallable.call(new VersionedCallable<>(() -> Simulator_15.create(player.getWorld(), position, highlight), 15)); } @Override