SteamWar/BauSystem
Archiviert
13
0

Removing Debug Messages

Dieser Commit ist enthalten in:
Chaoscaot 2021-03-25 07:54:43 +01:00
Ursprung ca7b87f466
Commit b533e27b85

Datei anzeigen

@ -28,7 +28,6 @@ import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -70,7 +69,6 @@ public class Detonator implements Listener {
}, 12), new VersionedCallable<>(() -> { }, 12), new VersionedCallable<>(() -> {
ItemMeta meta = item.getItemMeta(); ItemMeta meta = item.getItemMeta();
PersistentDataContainer container = meta.getPersistentDataContainer(); PersistentDataContainer container = meta.getPersistentDataContainer();
player.sendMessage(CraftItemStack.asNMSCopy(item).getTag().toString());
List<int[]> locs = new ArrayList<>(); List<int[]> locs = new ArrayList<>();
for (int i = 0; i < getDetoLocs(container); i++) { for (int i = 0; i < getDetoLocs(container); i++) {
NamespacedKey key = new NamespacedKey(BauSystem.getPlugin(), DETO_PREFIX + i); NamespacedKey key = new NamespacedKey(BauSystem.getPlugin(), DETO_PREFIX + i);
@ -116,11 +114,15 @@ public class Detonator implements Listener {
public static void execute(Player player) { public static void execute(Player player) {
VersionedRunnable.call(new VersionedRunnable(() -> execute(player, PLAYER_LOCS.get(player)), 12), new VersionedRunnable(() -> { VersionedRunnable.call(new VersionedRunnable(() -> execute(player, PLAYER_LOCS.get(player)), 12), new VersionedRunnable(() -> {
ItemStack item = getNextBestDetonator(player); try {
if(item == null) ItemStack item = getNextBestDetonator(player);
return; if(item == null)
Detonator detonator = getDetonator(player, item); return;
execute(player, detonator.getLocs()); Detonator detonator = getDetonator(player, item);
execute(player, detonator.getLocs());
}catch (SecurityException e) {
player.sendMessage(BauSystem.PREFIX + "§c" + e.getMessage());
}
}, 15)); }, 15));
} }