From fb79f079112f0015ade52806826a1e129af33792 Mon Sep 17 00:00:00 2001 From: "version-bump[github-action]" <41898282+version-bump[github-action]@users.noreply.github.com> Date: Sat, 3 May 2025 13:06:52 +0000 Subject: [PATCH 1/9] Bump version from 2.1.4 to 2.1.4-SNAPSHOT0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 96134d1..f94174c 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ plugily.projects thebridge - 2.1.4 + 2.1.4-SNAPSHOT0 TheBridge From 55ad44ea4dd1b2ae5de4cbace9b5eb202a8fa6b4 Mon Sep 17 00:00:00 2001 From: Tigerpanzer_02 <37453987+Tigerpanzer02@users.noreply.github.com> Date: Mon, 19 May 2025 22:19:23 +0200 Subject: [PATCH 2/9] Added Death.Blindness in config.yml to change length of blindness effect after death --- src/main/java/plugily/projects/thebridge/arena/Arena.java | 2 +- src/main/resources/config.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/plugily/projects/thebridge/arena/Arena.java b/src/main/java/plugily/projects/thebridge/arena/Arena.java index ddbc44a..5cfe8c9 100644 --- a/src/main/java/plugily/projects/thebridge/arena/Arena.java +++ b/src/main/java/plugily/projects/thebridge/arena/Arena.java @@ -290,7 +290,7 @@ public void resetPlayer(Player player) { player.setExp(0); player.setFireTicks(0); player.setGameMode(GameMode.SURVIVAL); - XPotion.BLINDNESS.buildPotionEffect(30, 10).apply(player); + XPotion.BLINDNESS.buildPotionEffect(plugin.getConfig().getInt("Death.Blindness", 30), 10).apply(player); VersionUtils.setMaxHealth(player, VersionUtils.getMaxHealth(player)); player.setHealth(VersionUtils.getMaxHealth(player)); player.setAllowFlight(false); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index d50f71c..33eff43 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -210,6 +210,9 @@ Natural-Regeneration: false # Should blocks when broken drop items during a game Block-Break-Drop: true +# How long should be the blindness effect after death? +Death: + Blindness: 30 # Settings about cages on all bases Cage: @@ -230,5 +233,5 @@ Update-Notifier: # Really, don't edit ;p # You edited it, huh? Next time hurt yourself! Do-Not-Edit: - File-Version: 2 + File-Version: 3 Core-Version: 5 From 616612a7540237123be94b4389bc6fd54bd0c43a Mon Sep 17 00:00:00 2001 From: "version-bump[github-action]" <41898282+version-bump[github-action]@users.noreply.github.com> Date: Mon, 19 May 2025 20:19:48 +0000 Subject: [PATCH 3/9] Bump version from 2.1.4-SNAPSHOT0 to 2.1.4-SNAPSHOT1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f94174c..37071e2 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ plugily.projects thebridge - 2.1.4-SNAPSHOT0 + 2.1.4-SNAPSHOT1 TheBridge From e362e66bfe40c4f37bc535c523d696f85777d7aa Mon Sep 17 00:00:00 2001 From: Tigerpanzer_02 <37453987+Tigerpanzer02@users.noreply.github.com> Date: Mon, 19 May 2025 22:20:18 +0200 Subject: [PATCH 4/9] Works with 1.21.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37071e2..323c63f 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ plugily.projects MiniGamesBox-Classic - 1.4.1 + 1.4.1-SNAPSHOT5 compile true From 1f3395762affb0964e4ef90aff42f83a2d7cad0f Mon Sep 17 00:00:00 2001 From: "version-bump[github-action]" <41898282+version-bump[github-action]@users.noreply.github.com> Date: Mon, 19 May 2025 20:20:43 +0000 Subject: [PATCH 5/9] Bump version from 2.1.4-SNAPSHOT1 to 2.1.4-SNAPSHOT2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 323c63f..481ea8b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ plugily.projects thebridge - 2.1.4-SNAPSHOT1 + 2.1.4-SNAPSHOT2 TheBridge From ee189a07bc01529b19040781404c38d1ffbdb36c Mon Sep 17 00:00:00 2001 From: Tigerpanzer_02 <37453987+Tigerpanzer02@users.noreply.github.com> Date: Tue, 20 May 2025 20:52:07 +0200 Subject: [PATCH 6/9] Added a onserverjoin message about wrong base arena setup if base cuboid is outside arena cuboid. --- .../thebridge/events/PluginEvents.java | 51 ++++++++++++++----- .../handlers/setup/LocationCategory.java | 2 +- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/main/java/plugily/projects/thebridge/events/PluginEvents.java b/src/main/java/plugily/projects/thebridge/events/PluginEvents.java index 0c0d8cd..08cfae6 100644 --- a/src/main/java/plugily/projects/thebridge/events/PluginEvents.java +++ b/src/main/java/plugily/projects/thebridge/events/PluginEvents.java @@ -19,6 +19,8 @@ package plugily.projects.thebridge.events; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -27,18 +29,22 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerItemConsumeEvent; +import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.potion.PotionEffectType; import plugily.projects.minigamesbox.api.arena.IArenaState; +import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder; +import plugily.projects.minigamesbox.classic.utils.services.UpdateChecker; import plugily.projects.minigamesbox.classic.utils.version.VersionUtils; import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial; import plugily.projects.minigamesbox.classic.utils.version.xseries.XPotion; import plugily.projects.thebridge.Main; import plugily.projects.thebridge.arena.Arena; +import plugily.projects.thebridge.arena.base.Base; /** * @author Tigerpanzer_02 - *

Created at 23.11.2020 + *

Created at 23.11.2020 */ public class PluginEvents implements Listener { @@ -49,9 +55,28 @@ public PluginEvents(Main plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } + @EventHandler + public void onJoinCheckBases(PlayerJoinEvent event) { + if(!event.getPlayer().hasPermission(plugin.getPluginNamePrefixLong() + ".admin") || !event.getPlayer().isOp()) { + return; + } + Bukkit.getScheduler().runTaskLater(plugin, () -> { + for(Arena arena : plugin.getArenaRegistry().getPluginArenas()) { + for(Base base : arena.getBases()) { + if(!(arena.getArenaBorder().isIn(base.getBaseCuboid().getMinPoint()) && (arena.getArenaBorder().isIn(base.getBaseCuboid().getMaxPoint())))) { + event.getPlayer().sendMessage(""); + event.getPlayer().sendMessage(ChatColor.BOLD + plugin.getPluginMessagePrefix() + "Your arena setup is broken. Please adjust your arena cuboid."); + event.getPlayer().sendMessage(new MessageBuilder("VALIDATOR_INVALID_ARENA_CONFIGURATION").asKey().arena(arena).value("YOUR BASE CUBOIDS ARE NOT INSIDE ARENA CUBOID").build()); + event.getPlayer().sendMessage(ChatColor.YELLOW + plugin.getPluginMessagePrefix() + "[CHECK BASE INSIDE ARENA] " + arena.getId() + base.getColor() + " Locations amin" + arena.getArenaBorder().getMinPoint() + "amax" + arena.getArenaBorder().getMaxPoint() + "bmin" + base.getBaseCuboid().getMinPoint() + "bma" + base.getBaseCuboid().getMaxPoint()); + } + } + } + }, 25); + } + @EventHandler public void onDrop(PlayerDropItemEvent event) { - if (plugin.getArenaRegistry().isInArena(event.getPlayer())) { + if(plugin.getArenaRegistry().isInArena(event.getPlayer())) { event.setCancelled(true); } } @@ -60,10 +85,10 @@ public void onDrop(PlayerDropItemEvent event) { public void onAppleConsume(PlayerItemConsumeEvent event) { Player player = event.getPlayer(); Arena arena = plugin.getArenaRegistry().getArena(player); - if (arena == null) { + if(arena == null) { return; } - if (event.getItem().getType() == XMaterial.GOLDEN_APPLE.parseMaterial()) { + if(event.getItem().getType() == XMaterial.GOLDEN_APPLE.parseMaterial()) { player.setFoodLevel(20); player.setHealth(VersionUtils.getMaxHealth(player)); player.removePotionEffect(XPotion.REGENERATION.getPotionEffectType()); @@ -73,9 +98,9 @@ public void onAppleConsume(PlayerItemConsumeEvent event) { @EventHandler(priority = EventPriority.HIGH) // highest priority to fully protect our game public void onBlockBreakEvent(BlockBreakEvent event) { - if (plugin.getArenaRegistry().isInArena(event.getPlayer()) - && plugin.getArenaRegistry().getArena(event.getPlayer()).getArenaState() - != IArenaState.IN_GAME) { + if(plugin.getArenaRegistry().isInArena(event.getPlayer()) + && plugin.getArenaRegistry().getArena(event.getPlayer()).getArenaState() + != IArenaState.IN_GAME) { event.setCancelled(true); } } @@ -83,22 +108,22 @@ public void onBlockBreakEvent(BlockBreakEvent event) { @EventHandler(priority = EventPriority.HIGH) // highest priority to fully protect our game public void onBuild(BlockPlaceEvent event) { - if (plugin.getArenaRegistry().isInArena(event.getPlayer()) - && plugin.getArenaRegistry().getArena(event.getPlayer()).getArenaState() - != IArenaState.IN_GAME) { + if(plugin.getArenaRegistry().isInArena(event.getPlayer()) + && plugin.getArenaRegistry().getArena(event.getPlayer()).getArenaState() + != IArenaState.IN_GAME) { event.setCancelled(true); } } @EventHandler public void onPlayerTeleport(PlayerTeleportEvent event) { - if (!plugin.getArenaRegistry().isInArena(event.getPlayer())) { + if(!plugin.getArenaRegistry().isInArena(event.getPlayer())) { return; } - if (event.getCause().equals(PlayerTeleportEvent.TeleportCause.END_PORTAL)) { + if(event.getCause().equals(PlayerTeleportEvent.TeleportCause.END_PORTAL)) { event.setCancelled(true); } - if (event.getCause().equals(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL)) { + if(event.getCause().equals(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL)) { event.setCancelled(true); } } diff --git a/src/main/java/plugily/projects/thebridge/handlers/setup/LocationCategory.java b/src/main/java/plugily/projects/thebridge/handlers/setup/LocationCategory.java index 832ca08..a695040 100644 --- a/src/main/java/plugily/projects/thebridge/handlers/setup/LocationCategory.java +++ b/src/main/java/plugily/projects/thebridge/handlers/setup/LocationCategory.java @@ -42,7 +42,7 @@ public void addItems(NormalFastInv gui) { gui.setItem((getInventoryLine() * 9) + 4, midLocation); getItemList().add(midLocation); - LocationSelectorItem arenaBorder = new LocationSelectorItem(getSetupInventory(), new ItemBuilder(XMaterial.BEDROCK.parseMaterial()), "Arena", "Location where all bases and lines are in \n (players will be able to build inside)", "arenalocation"); + LocationSelectorItem arenaBorder = new LocationSelectorItem(getSetupInventory(), new ItemBuilder(XMaterial.BEDROCK.parseMaterial()), "Arena", "Location where all bases and lines are in \n (players will be able to build inside) \n MAKE SURE TO SET IT OUTSIDE \n OF THE BASES WHICH YOU SET BEFORE!", "arenalocation"); gui.setItem((getInventoryLine() * 9) + 5, arenaBorder); getItemList().add(arenaBorder); } From 476153873b2f0798fea28879265f7deeb29c8b9d Mon Sep 17 00:00:00 2001 From: "version-bump[github-action]" <41898282+version-bump[github-action]@users.noreply.github.com> Date: Tue, 20 May 2025 18:52:35 +0000 Subject: [PATCH 7/9] Bump version from 2.1.4-SNAPSHOT2 to 2.1.4-SNAPSHOT3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 481ea8b..f37653a 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ plugily.projects thebridge - 2.1.4-SNAPSHOT2 + 2.1.4-SNAPSHOT3 TheBridge From db18e029130353b1cc1a389fee2d422bfeaa9743 Mon Sep 17 00:00:00 2001 From: Tigerpanzer_02 <37453987+Tigerpanzer02@users.noreply.github.com> Date: Mon, 9 Jun 2025 01:00:55 +0200 Subject: [PATCH 8/9] Updated to minigamesbox 1.4.2 --- .github/CHANGELOG.md | 6 ++++++ pom.xml | 2 +- src/main/resources/config.yml | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 5c7d44a..7fc660a 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,3 +1,9 @@ +### 2.1.5 Release (09.06.2025) +* Fixed startup issues on lower mc versions +* Added a onserverjoin message about wrong base arena setup if base cuboid is outside arena cuboid +* Added Death.Blindness in config.yml to change length of blindness effect after death +* Updated to minigamesbox 1.4.2 + ### 2.1.4 Release (03.05.2025) * Fixed arena forcestop the game after a player leave the Fullgame and not enough players to continue are online * Updated language.yml so by default base selection got prefix diff --git a/pom.xml b/pom.xml index f37653a..c8cbbe8 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ plugily.projects MiniGamesBox-Classic - 1.4.1-SNAPSHOT5 + 1.4.2 compile true diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 33eff43..1b86c94 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -98,6 +98,9 @@ Block: # Setting it to false means on all stages of the game the event will be cancelled. # Setting it to true means only while IN_GAME the event will be cancelled. Check: true + # Should all interactions with interactive materials such as doors / buttons / fences / redstone be blocked during ingame + # Full list see https://github.com/CryptoMorin/XSeries/blob/e84000a2bead7367d893cf8661f8d5432116adaa/core/src/main/java/com/cryptomorin/xseries/XTag.java#L2793 + Interact: false # Enable this option when you're using MySQL, otherwise it won't work. @@ -234,4 +237,4 @@ Update-Notifier: # You edited it, huh? Next time hurt yourself! Do-Not-Edit: File-Version: 3 - Core-Version: 5 + Core-Version: 6 From 0d09fad04a0d972959cd62ffc348f917d28edbff Mon Sep 17 00:00:00 2001 From: "version-bump[github-action]" <41898282+version-bump[github-action]@users.noreply.github.com> Date: Sun, 8 Jun 2025 23:01:22 +0000 Subject: [PATCH 9/9] Bump version from 2.1.4-SNAPSHOT3 to 2.1.4-SNAPSHOT4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8cbbe8..bbd5d14 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ plugily.projects thebridge - 2.1.4-SNAPSHOT3 + 2.1.4-SNAPSHOT4 TheBridge