diff --git a/Plugins/Mineplex.Core/src/mineplex/core/npc/command/AddCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/npc/command/AddCommand.java index 5de1e1525..e17daf159 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/npc/command/AddCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/npc/command/AddCommand.java @@ -13,7 +13,7 @@ public class AddCommand extends CommandBase { public AddCommand(NpcManager plugin) { - super(plugin, Rank.DEVELOPER, "add"); + super(plugin, Rank.JNR_DEV, "add"); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/npc/command/DeleteCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/npc/command/DeleteCommand.java index 71dce58c0..f6a698add 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/npc/command/DeleteCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/npc/command/DeleteCommand.java @@ -12,7 +12,7 @@ public class DeleteCommand extends CommandBase { public DeleteCommand(NpcManager plugin) { - super(plugin, Rank.DEVELOPER, "del"); + super(plugin, Rank.JNR_DEV, "del"); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/npc/command/NpcCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/npc/command/NpcCommand.java index 5e66eee21..81bd78c4a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/npc/command/NpcCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/npc/command/NpcCommand.java @@ -10,7 +10,7 @@ public class NpcCommand extends MultiCommandBase { public NpcCommand(NpcManager plugin) { - super(plugin, Rank.DEVELOPER, new Rank[] {Rank.JNR_DEV}, "npc"); + super(plugin, Rank.JNR_DEV, "npc"); AddCommand(new AddCommand(plugin)); AddCommand(new DeleteCommand(plugin)); diff --git a/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanTerritory.java b/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanTerritory.java index 1ee9303a1..904388533 100644 --- a/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanTerritory.java +++ b/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanTerritory.java @@ -1,5 +1,7 @@ package mineplex.game.clans.core.repository; +import org.bukkit.Location; + import mineplex.game.clans.core.repository.tokens.ClanTerritoryToken; public class ClanTerritory @@ -16,4 +18,14 @@ public class ClanTerritory public boolean Safe; public String Owner = ""; public String Chunk = ""; + + public boolean isSafe(Location location) + { + if (Owner.equals("Spawn")) + { + return location.getY() > 190; + } + + return Safe; + } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java index 643a3fa89..10af93fda 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java @@ -742,6 +742,6 @@ public class ClansAdmin Clans.getClanDataAccess().safe(claim, caller.getName()); //Inform - UtilPlayer.message(caller, F.main("Clans Admin", "Territory Safe Zone: " + F.tf(claim.Safe))); + UtilPlayer.message(caller, F.main("Clans Admin", "Territory Safe Zone: " + F.tf(claim.isSafe(caller.getLocation())))); } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java index 070e4dcbb..d151413f1 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java @@ -246,7 +246,7 @@ public class ClansUtility { if (!Clans.getClaimMap().containsKey(UtilWorld.chunkToStr(loc.getChunk()))) return false; - return Clans.getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).Safe; + return Clans.getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).isSafe(loc); } public boolean isChunkHome(ClanInfo clan, Chunk chunk) @@ -439,15 +439,15 @@ public class ClansUtility } // Player Territory - public ClanRelation relPT(Player pA, String tB) + public ClanRelation relPT(Player player, String territory) { - ClanTerritory claim = getClaim(tB); - if (claim != null && claim.Safe) + ClanTerritory claim = getClaim(territory); + if (claim != null && claim.isSafe(player.getLocation())) { return ClanRelation.SAFE; } - return rel(getClanByPlayer(pA), getOwner(tB)); + return rel(getClanByPlayer(player), getOwner(territory)); } // Clan Territory diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/RegionsCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/RegionsCommand.java index 844c8173d..16d2c14bf 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/RegionsCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/RegionsCommand.java @@ -16,7 +16,7 @@ public class RegionsCommand extends CommandBase public RegionsCommand(ClansManager plugin) { - super(plugin, Rank.ADMIN, "region-reset"); + super(plugin, Rank.ADMIN, new Rank[]{Rank.JNR_DEV},"region-reset"); _manager = plugin; } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java index e127a0d02..59055ea02 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java @@ -155,7 +155,7 @@ public class ObserverManager extends MiniPlugin { ClanTerritory territory = _clansManager.getClanUtility().getClaim(player.getLocation()); - if (territory == null || !territory.Safe) + if (territory == null || !territory.isSafe(player.getLocation())) { if (notify) UtilPlayer.message(player, F.main("Observer", "You must be in a Safe Zone to use observer mode!")); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java index 5214d58bd..26f72b5c5 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java @@ -39,7 +39,7 @@ import mineplex.minecraft.game.classcombat.Skill.event.SkillTeleportEvent; public class ClansRegions extends MiniPlugin { public final static String DEFAULT_WORLD_NAME = "world"; - public final static int SPAWN_RADIUS = 3; // Radius of spawn claim area (measured in chunks) + public final static int SPAWN_RADIUS = 2; // Radius of spawn claim area (measured in chunks) public final static int SHOP_RADIUS = 4; // Radius of shop claim area (measured in chunks) public final static int FIELDS_RADIUS = 7; // Radius of fields claim area (measured in chunks) public final static int BORDERLANDS_RADIUS = 50; // Radius of borderlands claim area (measured in chunks) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java index 30aa72a9e..4efdaf93c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java @@ -94,7 +94,7 @@ public class Gameplay extends MiniPlugin @EventHandler(priority = EventPriority.LOWEST) public void spawnDamage(CustomDamageEvent event) { - if (_clansManager.getClanUtility().getClaim(event.GetDamageeEntity().getLocation()) != null && _clansManager.getClanUtility().getClaim(event.GetDamageeEntity().getLocation()).Safe) + if (_clansManager.getClanUtility().getClaim(event.GetDamageeEntity().getLocation()) != null && _clansManager.getClanUtility().getClaim(event.GetDamageeEntity().getLocation()).isSafe(event.GetDamageeEntity().getLocation())) { event.SetCancelled("Safe Zone"); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/MagneticMaul.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/MagneticMaul.java index 1b5537aee..8ba7e7b91 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/MagneticMaul.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/MagneticMaul.java @@ -27,7 +27,7 @@ public class MagneticMaul extends LegendaryItem Location loc = wielder.getLocation(); if (ClansManager.getInstance().getClaimMap().containsKey(UtilWorld.chunkToStr(loc.getChunk()))) { - if (!ClansManager.getInstance().getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).Safe) + if (!ClansManager.getInstance().getClaimMap().get(UtilWorld.chunkToStr(loc.getChunk())).isSafe(wielder.getLocation())) { return; }