Protect visitors Spawn point

This commit is contained in:
Fabrizio La Rosa 2020-06-20 01:42:00 +02:00
parent b46473e9fd
commit d8e38a2550

View File

@ -129,7 +129,8 @@ public class Block implements Listener {
IslandWorld world = worldManager.getIslandWorld(block.getWorld()); IslandWorld world = worldManager.getIslandWorld(block.getWorld());
if (LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Main).clone().subtract(0.0D, 1.0D, 0.0D)) 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")) { if (configLoad.getBoolean("Island.Spawn.Protection")) {
event.setCancelled(true); event.setCancelled(true);
skyblock.getMessageManager().sendMessage(player, skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getString("Island.SpawnProtection.Break.Message")); skyblock.getMessageManager().sendMessage(player, skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getString("Island.SpawnProtection.Break.Message"));