diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java index 0daed5af..adcf545c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/attributescopy/AttributesPlaceListener.java @@ -33,7 +33,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.profile.PlayerProfile; import java.util.HashSet; import java.util.List; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java index ea48383e..953d709a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java @@ -141,7 +141,10 @@ public class WarpListener implements Listener { @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { - warpEntityServer.remove(event.getPlayer()).close(); + warpEntityServer.computeIfPresent(event.getPlayer(), (player, rEntityServer) -> { + rEntityServer.close(); + return null; + }); selected.remove(event.getPlayer()); } }