From cd6df3d1a9e8ddec62f5b2fd0e16dbd385222b47 Mon Sep 17 00:00:00 2001 From: Maxlego08 Date: Sat, 15 Feb 2025 19:15:34 +0100 Subject: [PATCH] :memo: Fix error with worlds --- changelog.md | 3 ++- src/fr/maxlego08/koth/ZKoth.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 575d730..c4de598 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # Unreleased - Fix command description -- Fix default koth create scoreboard. You now have a real configuration that will be created +- Fix default koth create scoreboard. A real configuration will now be created +- Fixed Discord Webhook. The configuration loading and sending are now correct # 3.1.0 diff --git a/src/fr/maxlego08/koth/ZKoth.java b/src/fr/maxlego08/koth/ZKoth.java index 436bb8d..6ba05c4 100644 --- a/src/fr/maxlego08/koth/ZKoth.java +++ b/src/fr/maxlego08/koth/ZKoth.java @@ -439,8 +439,10 @@ public class ZKoth extends ZUtils implements Koth { if (this.blacklistTeamId.contains(this.kothTeam.getTeamId(player))) return; Cuboid cuboid = this.getCuboid(); - + if (player.getWorld() != cuboid.getWorld()) return; + Location pLoc = player.getLocation(); + if (pLoc.distanceSquared(this.getCenter()) > Math.pow(scoreboardRadius, 2)) { plugin.getScoreBoardManager().delete(player); plugin.getScoreBoardManager().getBoards().remove(player);