From ce74b70a94501d5e71b2f389f863a98bc463fd14 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 11 Mar 2022 17:10:05 +0100 Subject: [PATCH] Hologram nice text formatting --- .../lobby/listener/InventoryInteraction.java | 3 +- .../lobby/portal/FightserverPortal.java | 52 ++++++++++++++++--- 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/src/de/steamwar/lobby/listener/InventoryInteraction.java b/src/de/steamwar/lobby/listener/InventoryInteraction.java index 073df1a..6093e0a 100644 --- a/src/de/steamwar/lobby/listener/InventoryInteraction.java +++ b/src/de/steamwar/lobby/listener/InventoryInteraction.java @@ -31,7 +31,8 @@ public class InventoryInteraction extends BasicListener { @EventHandler public void handlePlayerInteract(PlayerInteractEvent event) { - if(event.getItem() == null) + ItemStack item = event.getItem(); + if(item == null || item.getType() == Material.FIREWORK_ROCKET) return; if(!ModifyCommand.modifying(event.getPlayer())) diff --git a/src/de/steamwar/lobby/portal/FightserverPortal.java b/src/de/steamwar/lobby/portal/FightserverPortal.java index 8e299b6..339eb60 100644 --- a/src/de/steamwar/lobby/portal/FightserverPortal.java +++ b/src/de/steamwar/lobby/portal/FightserverPortal.java @@ -29,7 +29,9 @@ import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.util.Vector; +import java.text.MessageFormat; import java.util.*; +import java.util.logging.Level; public class FightserverPortal implements PortalHandler, Comparable { @@ -78,12 +80,6 @@ public class FightserverPortal implements PortalHandler, Comparable list = portals.computeIfAbsent(gamemode, mode -> new ArrayList<>()); @@ -105,12 +101,16 @@ public class FightserverPortal implements PortalHandler, Comparable