From 4a51dbc4baa11fc06535e0204dccce2ec4d457e7 Mon Sep 17 00:00:00 2001 From: goodroach Date: Sat, 7 Jun 2025 19:50:45 -1000 Subject: [PATCH 1/4] changed ExplosionListener --- build.gradle.kts | 2 +- .../movecraft/worldguard/CustomFlags.java | 2 + .../listener/ExplosionListener.java | 79 +++++++++++++++++++ .../listener/FireSpreadListener.java | 24 ++++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java diff --git a/build.gradle.kts b/build.gradle.kts index 43548fc..5b020ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,7 @@ dependencies { group = "net.countercraft.movecraft.worldguard" version = "1.0.0_beta-5" description = "Movecraft-WorldGuard" -java.toolchain.languageVersion = JavaLanguageVersion.of(17) +java.toolchain.languageVersion = JavaLanguageVersion.of(21) tasks.jar { archiveBaseName.set("Movecraft-WorldGuard") diff --git a/src/main/java/net/countercraft/movecraft/worldguard/CustomFlags.java b/src/main/java/net/countercraft/movecraft/worldguard/CustomFlags.java index 179004e..7c074c8 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/CustomFlags.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/CustomFlags.java @@ -13,6 +13,7 @@ public class CustomFlags { public static final StateFlag ALLOW_CRAFT_SINK = new StateFlag("allow-craft-sink", false); public static final StateFlag ALLOW_CRAFT_TRANSLATE = new StateFlag("allow-craft-translate", false); public static final StateFlag ALLOW_CRAFT_REPAIR = new StateFlag("allow-craft-repair", false); + public static final StateFlag ALLOW_CRAFT_COMBAT = new StateFlag("allow-craft-combat", false); public static void register() { try { @@ -23,6 +24,7 @@ public static void register() { registry.register(ALLOW_CRAFT_SINK); registry.register(ALLOW_CRAFT_TRANSLATE); registry.register(ALLOW_CRAFT_REPAIR); + registry.register(ALLOW_CRAFT_COMBAT); } catch (Exception e) { MovecraftWorldGuard.getInstance().getLogger().log( diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java index e883b8f..cc53ac5 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java @@ -1,10 +1,30 @@ package net.countercraft.movecraft.worldguard.listener; import com.sk89q.worldguard.protection.flags.Flags; +import com.sk89q.worldguard.protection.flags.StateFlag; +import net.countercraft.movecraft.MovecraftLocation; +import net.countercraft.movecraft.craft.Craft; +import net.countercraft.movecraft.craft.CraftManager; import net.countercraft.movecraft.events.ExplosionEvent; +import net.countercraft.movecraft.util.MathUtils; +import net.countercraft.movecraft.worldguard.CustomFlags; import net.countercraft.movecraft.worldguard.MovecraftWorldGuard; +import net.countercraft.movecraft.worldguard.utils.WorldGuardUtils; +import org.bukkit.Location; +import org.bukkit.block.Block; +import org.bukkit.event.Event; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockExplodeEvent; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.jetbrains.annotations.NotNull; + +import javax.swing.text.html.parser.Entity; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; public class ExplosionListener implements Listener { @EventHandler @@ -22,4 +42,63 @@ public void onExplosion(ExplosionEvent e) { break; } } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onEntityExplosion(EntityExplodeEvent e) { + e.blockList().removeAll(getProtectedBlocks(e.blockList())); + } + + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onTorpedoExplosion(BlockExplodeEvent e) { + e.blockList().removeAll(getProtectedBlocks(e.blockList())); + } + + private List getProtectedBlocks(List blocks) { + List protectedBlocks = new ArrayList<>(); + for (Block block : blocks) { + WorldGuardUtils.State state = MovecraftWorldGuard.getInstance().getWGUtils().getState( + null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT); + if (state == WorldGuardUtils.State.ALLOW) { + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); + Craft craft = fastNearestCraftToLoc(block.getLocation()); + if (craft == null) { + protectedBlocks.add(block); + System.out.println("Protected block added!"); + continue; + } + if (!craft.getHitBox().contains(loc)) { + protectedBlocks.add(block); + System.out.println("Protected block added!"); + } + } else if (state == WorldGuardUtils.State.DENY) { + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); + Craft craft = fastNearestCraftToLoc(block.getLocation()); + if (craft == null) { + continue; + } + if (craft.getHitBox().contains(loc)) { + protectedBlocks.add(block); + System.out.println("Protected block added!"); + } + } + } + return protectedBlocks; + } + + private Craft fastNearestCraftToLoc(@NotNull Location source) { + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(source); + Craft closest = null; + long closestDistSquared = Long.MAX_VALUE; + for (Craft other : CraftManager.getInstance()) { + if (other.getWorld() != source.getWorld()) + continue; + + long distSquared = other.getHitBox().getMidPoint().distanceSquared(loc); + if (distSquared < closestDistSquared) { + closestDistSquared = distSquared; + closest = other; + } + } + return closest; + } } diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java new file mode 100644 index 0000000..35c980e --- /dev/null +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java @@ -0,0 +1,24 @@ +package net.countercraft.movecraft.worldguard.listener; + +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBurnEvent; +import org.bukkit.event.block.BlockIgniteEvent; +import org.bukkit.event.block.BlockSpreadEvent; + +public class FireSpreadListener implements Listener { + @EventHandler + public void onIgnite(BlockIgniteEvent event) { + + } + + @EventHandler + public void onBurn(BlockBurnEvent event) { + + } + + @EventHandler + public void onSpread(BlockSpreadEvent event) { + + } +} From beab55f57fea638f385a90d529846ae5b8c4e04d Mon Sep 17 00:00:00 2001 From: goodroach Date: Tue, 10 Jun 2025 21:52:53 -1000 Subject: [PATCH 2/4] add fire protection too --- .../worldguard/MovecraftWorldGuard.java | 1 + .../listener/ExplosionListener.java | 67 +++++++------------ .../listener/FireSpreadListener.java | 47 +++++++++++-- .../worldguard/utils/WorldGuardUtils.java | 23 +++++++ 4 files changed, 92 insertions(+), 46 deletions(-) diff --git a/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java b/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java index e81c901..f36a562 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java @@ -71,6 +71,7 @@ public void onEnable() { getServer().getPluginManager().registerEvents(new CraftRotateListener(), this); getServer().getPluginManager().registerEvents(new CraftSinkListener(), this); getServer().getPluginManager().registerEvents(new CraftTranslateListener(), this); + getServer().getPluginManager().registerEvents(new FireSpreadListener(), this); getServer().getPluginManager().registerEvents(new ExplosionListener(), this); } diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java index cc53ac5..47f8420 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java @@ -56,49 +56,34 @@ public void onTorpedoExplosion(BlockExplodeEvent e) { private List getProtectedBlocks(List blocks) { List protectedBlocks = new ArrayList<>(); for (Block block : blocks) { - WorldGuardUtils.State state = MovecraftWorldGuard.getInstance().getWGUtils().getState( - null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT); - if (state == WorldGuardUtils.State.ALLOW) { - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); - Craft craft = fastNearestCraftToLoc(block.getLocation()); - if (craft == null) { - protectedBlocks.add(block); - System.out.println("Protected block added!"); - continue; - } - if (!craft.getHitBox().contains(loc)) { - protectedBlocks.add(block); - System.out.println("Protected block added!"); - } - } else if (state == WorldGuardUtils.State.DENY) { - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); - Craft craft = fastNearestCraftToLoc(block.getLocation()); - if (craft == null) { - continue; - } - if (craft.getHitBox().contains(loc)) { - protectedBlocks.add(block); - System.out.println("Protected block added!"); - } + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); + Craft craft = MathUtils.fastNearestCraftToLoc( + CraftManager.getInstance().getCraftsInWorld(block.getWorld()), + block.getLocation() + ); + switch (MovecraftWorldGuard.getInstance().getWGUtils().getState( + null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT)) { + case ALLOW: + if (craft == null) { + protectedBlocks.add(block); + continue; + } + if (!craft.getHitBox().contains(loc)) { + protectedBlocks.add(block); + } + case NONE: + break; + case DENY: + if (craft == null) { + continue; + } + if (craft.getHitBox().contains(loc)) { + protectedBlocks.add(block); + } + default: + break; } } return protectedBlocks; } - - private Craft fastNearestCraftToLoc(@NotNull Location source) { - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(source); - Craft closest = null; - long closestDistSquared = Long.MAX_VALUE; - for (Craft other : CraftManager.getInstance()) { - if (other.getWorld() != source.getWorld()) - continue; - - long distSquared = other.getHitBox().getMidPoint().distanceSquared(loc); - if (distSquared < closestDistSquared) { - closestDistSquared = distSquared; - closest = other; - } - } - return closest; - } } diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java index 35c980e..d58edfa 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java @@ -1,5 +1,12 @@ package net.countercraft.movecraft.worldguard.listener; +import net.countercraft.movecraft.MovecraftLocation; +import net.countercraft.movecraft.craft.Craft; +import net.countercraft.movecraft.craft.CraftManager; +import net.countercraft.movecraft.util.MathUtils; +import net.countercraft.movecraft.worldguard.CustomFlags; +import net.countercraft.movecraft.worldguard.MovecraftWorldGuard; +import org.bukkit.block.Block; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockBurnEvent; @@ -9,16 +16,46 @@ public class FireSpreadListener implements Listener { @EventHandler public void onIgnite(BlockIgniteEvent event) { - + event.setCancelled(fireCheck(event.getBlock())); } @EventHandler public void onBurn(BlockBurnEvent event) { - + event.setCancelled(fireCheck(event.getBlock())); } - @EventHandler - public void onSpread(BlockSpreadEvent event) { - + private boolean fireCheck(Block block) { + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); + Craft craft = MathUtils.fastNearestCraftToLoc( + CraftManager.getInstance().getCraftsInWorld(block.getWorld()), + block.getLocation() + ); + switch (MovecraftWorldGuard.getInstance().getWGUtils().getState( + null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT)) { + case ALLOW: + // Protect the area outside the craft + if (craft == null) { + return true; + } + if (!craft.getHitBox().contains(loc)) { + System.out.println("Protected!"); + return true; + } + break; + case DENY: + // Protect the block if fire occurs inside craft + if (craft == null) { + break; + } + if (craft.getHitBox().contains(loc)) { + System.out.println("Protected!"); + return true; + } + break; + default: + break; + } + System.out.println("Not protected"); + return false; } } diff --git a/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java b/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java index b57a3c1..09de936 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java @@ -14,7 +14,9 @@ import com.sk89q.worldguard.protection.regions.RegionQuery; import net.countercraft.movecraft.MovecraftLocation; import net.countercraft.movecraft.craft.Craft; +import net.countercraft.movecraft.craft.CraftManager; import net.countercraft.movecraft.exception.EmptyHitBoxException; +import net.countercraft.movecraft.util.MathUtils; import net.countercraft.movecraft.util.Pair; import net.countercraft.movecraft.util.hitboxes.HitBox; import org.bukkit.Bukkit; @@ -405,4 +407,25 @@ private Set getHitboxCorners(@NotNull HitBox hitbox) throws E } return corners; } + + /** + * @param source Location of the block + * @return The closest craft to the block. If the block is within the craft, it should return it. + */ + private Craft fastNearestCraftToLoc(@NotNull Location source) { + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(source); + Craft closest = null; + long closestDistSquared = Long.MAX_VALUE; + for (Craft other : CraftManager.getInstance()) { + if (other.getWorld() != source.getWorld()) + continue; + + long distSquared = other.getHitBox().getMidPoint().distanceSquared(loc); + if (distSquared < closestDistSquared) { + closestDistSquared = distSquared; + closest = other; + } + } + return closest; + } } From 2563dafed38986bfcfbf3a5d7ef8d80cf92fbbb7 Mon Sep 17 00:00:00 2001 From: goodroach Date: Tue, 10 Jun 2025 22:54:25 -1000 Subject: [PATCH 3/4] Move the block protection check to WGUtils --- .../listener/ExplosionListener.java | 28 +--------- .../listener/FireSpreadListener.java | 39 +------------- .../listener/ProjectileHitListener.java | 16 ++++++ .../worldguard/utils/WorldGuardUtils.java | 51 +++++++++++++------ 4 files changed, 55 insertions(+), 79 deletions(-) create mode 100644 src/main/java/net/countercraft/movecraft/worldguard/listener/ProjectileHitListener.java diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java index 47f8420..be0799e 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java @@ -56,32 +56,8 @@ public void onTorpedoExplosion(BlockExplodeEvent e) { private List getProtectedBlocks(List blocks) { List protectedBlocks = new ArrayList<>(); for (Block block : blocks) { - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); - Craft craft = MathUtils.fastNearestCraftToLoc( - CraftManager.getInstance().getCraftsInWorld(block.getWorld()), - block.getLocation() - ); - switch (MovecraftWorldGuard.getInstance().getWGUtils().getState( - null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT)) { - case ALLOW: - if (craft == null) { - protectedBlocks.add(block); - continue; - } - if (!craft.getHitBox().contains(loc)) { - protectedBlocks.add(block); - } - case NONE: - break; - case DENY: - if (craft == null) { - continue; - } - if (craft.getHitBox().contains(loc)) { - protectedBlocks.add(block); - } - default: - break; + if (MovecraftWorldGuard.getInstance().getWGUtils().isProtectedFromBreak(block)) { + protectedBlocks.add(block); } } return protectedBlocks; diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java index d58edfa..1119c0d 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/FireSpreadListener.java @@ -16,46 +16,11 @@ public class FireSpreadListener implements Listener { @EventHandler public void onIgnite(BlockIgniteEvent event) { - event.setCancelled(fireCheck(event.getBlock())); + event.setCancelled(MovecraftWorldGuard.getInstance().getWGUtils().isProtectedFromBreak(event.getBlock())); } @EventHandler public void onBurn(BlockBurnEvent event) { - event.setCancelled(fireCheck(event.getBlock())); - } - - private boolean fireCheck(Block block) { - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); - Craft craft = MathUtils.fastNearestCraftToLoc( - CraftManager.getInstance().getCraftsInWorld(block.getWorld()), - block.getLocation() - ); - switch (MovecraftWorldGuard.getInstance().getWGUtils().getState( - null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT)) { - case ALLOW: - // Protect the area outside the craft - if (craft == null) { - return true; - } - if (!craft.getHitBox().contains(loc)) { - System.out.println("Protected!"); - return true; - } - break; - case DENY: - // Protect the block if fire occurs inside craft - if (craft == null) { - break; - } - if (craft.getHitBox().contains(loc)) { - System.out.println("Protected!"); - return true; - } - break; - default: - break; - } - System.out.println("Not protected"); - return false; + event.setCancelled(MovecraftWorldGuard.getInstance().getWGUtils().isProtectedFromBreak(event.getBlock())); } } diff --git a/src/main/java/net/countercraft/movecraft/worldguard/listener/ProjectileHitListener.java b/src/main/java/net/countercraft/movecraft/worldguard/listener/ProjectileHitListener.java new file mode 100644 index 0000000..524c2ce --- /dev/null +++ b/src/main/java/net/countercraft/movecraft/worldguard/listener/ProjectileHitListener.java @@ -0,0 +1,16 @@ +package net.countercraft.movecraft.worldguard.listener; + +import net.countercraft.movecraft.worldguard.MovecraftWorldGuard; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.ProjectileHitEvent; + +public class ProjectileHitListener implements Listener { + @EventHandler + public void onProjectileHit(ProjectileHitEvent event) { + if (event.getHitBlock() == null) { + return; + } + event.setCancelled(MovecraftWorldGuard.getInstance().getWGUtils().isProtectedFromBreak(event.getHitBlock())); + } +} diff --git a/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java b/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java index 09de936..437c898 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/utils/WorldGuardUtils.java @@ -19,10 +19,13 @@ import net.countercraft.movecraft.util.MathUtils; import net.countercraft.movecraft.util.Pair; import net.countercraft.movecraft.util.hitboxes.HitBox; +import net.countercraft.movecraft.worldguard.CustomFlags; +import net.countercraft.movecraft.worldguard.MovecraftWorldGuard; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.OfflinePlayer; import org.bukkit.World; +import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; @@ -409,23 +412,39 @@ private Set getHitboxCorners(@NotNull HitBox hitbox) throws E } /** - * @param source Location of the block - * @return The closest craft to the block. If the block is within the craft, it should return it. + * @param block Block to check + * @return A boolean that determines if the block is protected from breaking. */ - private Craft fastNearestCraftToLoc(@NotNull Location source) { - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(source); - Craft closest = null; - long closestDistSquared = Long.MAX_VALUE; - for (Craft other : CraftManager.getInstance()) { - if (other.getWorld() != source.getWorld()) - continue; - - long distSquared = other.getHitBox().getMidPoint().distanceSquared(loc); - if (distSquared < closestDistSquared) { - closestDistSquared = distSquared; - closest = other; - } + @NotNull + public boolean isProtectedFromBreak(Block block) { + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); + Craft craft = MathUtils.fastNearestCraftToLoc( + CraftManager.getInstance().getCraftsInWorld(block.getWorld()), + block.getLocation() + ); + switch (MovecraftWorldGuard.getInstance().getWGUtils().getState( + null, block.getLocation(), CustomFlags.ALLOW_CRAFT_COMBAT)) { + case ALLOW: + // Protect the area outside the craft + if (craft == null) { + return true; + } + if (!craft.getHitBox().contains(loc)) { + return true; + } + break; + case DENY: + // Protect the block if fire occurs inside craft + if (craft == null) { + break; + } + if (craft.getHitBox().contains(loc)) { + return true; + } + break; + default: + break; } - return closest; + return false; } } From c0382eb3bb706d3f4a6dc81c9187cef5cfb077b1 Mon Sep 17 00:00:00 2001 From: goodroach Date: Wed, 11 Jun 2025 01:56:30 -1000 Subject: [PATCH 4/4] Add ProjectileHitListener --- .../countercraft/movecraft/worldguard/MovecraftWorldGuard.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java b/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java index f36a562..d0c287e 100644 --- a/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java +++ b/src/main/java/net/countercraft/movecraft/worldguard/MovecraftWorldGuard.java @@ -73,6 +73,7 @@ public void onEnable() { getServer().getPluginManager().registerEvents(new CraftTranslateListener(), this); getServer().getPluginManager().registerEvents(new FireSpreadListener(), this); getServer().getPluginManager().registerEvents(new ExplosionListener(), this); + getServer().getPluginManager().registerEvents(new ProjectileHitListener(), this); } public WorldGuardUtils getWGUtils() {