From 9626697c8f48f351bb1db6b4a343619fe9846b32 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 8 Feb 2023 18:18:41 -0500 Subject: [PATCH] update dependicies, fix worldborder, fix timer when player leaves, fix drop items --- pom.xml | 10 +++++----- .../hideAndSeek/command/map/set/Border.java | 2 +- .../java/net/tylermurphy/hideAndSeek/game/Game.java | 3 +++ .../hideAndSeek/game/listener/PlayerHandler.java | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index d110881..4cf22dd 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,7 @@ org.xerial sqlite-jdbc - 3.39.3.0 + 3.40.1.0 org.jetbrains @@ -121,23 +121,23 @@ com.github.cryptomorin XSeries - 9.1.0 + 9.2.0 me.clip placeholderapi - 2.11.1 + 2.11.2 provided com.zaxxer HikariCP - 5.0.1 + 4.0.3 org.mariadb.jdbc mariadb-java-client - 3.0.6 + 3.1.2 \ No newline at end of file diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/map/set/Border.java b/src/main/java/net/tylermurphy/hideAndSeek/command/map/set/Border.java index 64bf5d4..2c05115 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/map/set/Border.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/map/set/Border.java @@ -36,7 +36,7 @@ public class Border implements ICommand { addToConfig("worldBorder.enabled",false); saveConfig(); sender.sendMessage(messagePrefix + message("WORLDBORDER_DISABLE")); - Main.getInstance().getGame().getCurrentMap().getWorldBorder().resetWorldBorder(); + map.getWorldBorder().resetWorldBorder(); return; } int num,delay,change; diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java b/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java index fbae413..41df9b8 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/Game.java @@ -242,6 +242,9 @@ public class Game { } } else { lobbyTimer = -1; + if (gameTick % 20 == 0) { + board.reloadLobbyBoards(); + } } } diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/listener/PlayerHandler.java b/src/main/java/net/tylermurphy/hideAndSeek/game/listener/PlayerHandler.java index 64ed728..760f1f9 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/listener/PlayerHandler.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/listener/PlayerHandler.java @@ -48,7 +48,8 @@ public class PlayerHandler implements Listener { public void onItemSpawn(ItemSpawnEvent event){ if(Main.getInstance().getGame().getStatus() == Status.STANDBY) return; ItemStack item = event.getEntity().getItemStack(); - if(!Items.matchItem(item)) return; + if (!Items.matchItem(item)) return; + if (dropItems) return; event.setCancelled(true); }