From d8e38a25500c5bb6d87acfc63ec61cd3c9babbf9 Mon Sep 17 00:00:00 2001 From: Fabrizio La Rosa Date: Sat, 20 Jun 2020 01:42:00 +0200 Subject: [PATCH] Protect visitors Spawn point --- src/main/java/com/songoda/skyblock/listeners/Block.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/skyblock/listeners/Block.java b/src/main/java/com/songoda/skyblock/listeners/Block.java index cb737dd9..451846df 100644 --- a/src/main/java/com/songoda/skyblock/listeners/Block.java +++ b/src/main/java/com/songoda/skyblock/listeners/Block.java @@ -129,7 +129,8 @@ public class Block implements Listener { IslandWorld world = worldManager.getIslandWorld(block.getWorld()); if (LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Main).clone().subtract(0.0D, 1.0D, 0.0D)) - || LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Main).clone())) { + || LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Main).clone()) || LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Visitor).clone().subtract(0.0D, 1.0D, 0.0D)) + || LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Visitor).clone())) { if (configLoad.getBoolean("Island.Spawn.Protection")) { event.setCancelled(true); skyblock.getMessageManager().sendMessage(player, skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getString("Island.SpawnProtection.Break.Message"));