diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/clans/ui/ClansBanPage.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/clans/ui/ClansBanPage.java index cf4e187d5..cb5d338be 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/clans/ui/ClansBanPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/clans/ui/ClansBanPage.java @@ -8,6 +8,7 @@ import org.bukkit.inventory.ItemStack; import mineplex.core.Managers; import mineplex.core.common.util.C; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.donation.DonationManager; import mineplex.core.itemstack.ItemBuilder; @@ -133,9 +134,12 @@ public class ClansBanPage extends ShopPageBase getPlugin().unban(_victimClient, ban, getPlayer().getName(), _reason, () -> { playAcceptSound(player); - SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", - new SlackMessage("Clans Command Logger", "crossed_swords", getPlayer().getName() + " has removed a blacklist from " + _victimName + " for " + _reason + "."), - true); + if (!UtilServer.isTestServer()) + { + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", getPlayer().getName() + " has removed a blacklist from " + _victimName + " for '" + _reason + "'."), + true); + } refresh(); }); } @@ -155,9 +159,12 @@ public class ClansBanPage extends ShopPageBase if (ban.isPresent()) { playAcceptSound(getPlayer()); - SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", - new SlackMessage("Clans Command Logger", "crossed_swords", getPlayer().getName() + " has blacklisted " + _victimName + " for " + _reason + ". Duration: " + UtilTime.MakeStr(_time)), - true); + if (!UtilServer.isTestServer()) + { + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", getPlayer().getName() + " has blacklisted " + _victimName + " for '" + _reason + "'. Duration: " + UtilTime.MakeStr(_permanent ? -1 : _time)), + true); + } refresh(); } else 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 8f0d8a777..bf8102102 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 @@ -54,21 +54,24 @@ public class ClansAdmin return; } - StringBuilder cmd = new StringBuilder("/c"); - for (String a : args) + if (!UtilServer.isTestServer()) { - cmd.append(" ").append(a); - } - for (int i = 0; i < cmd.length(); i++) - { - if (cmd.charAt(i) == '`') + StringBuilder cmd = new StringBuilder("/c"); + for (String a : args) { - cmd.setCharAt(i, '\''); + cmd.append(" ").append(a); } + for (int i = 0; i < cmd.length(); i++) + { + if (cmd.charAt(i) == '`') + { + cmd.setCharAt(i, '\''); + } + } + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has issued command `" + cmd.toString() + "` on " + UtilServer.getServerName() + "."), + true); } - SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", - new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has issued command `" + cmd.toString() + "` on " + UtilServer.getServerName() + "."), - true); if (args.length == 1) help(caller); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java index 5af3c6114..94002b169 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java @@ -94,9 +94,12 @@ public class InvseeCommand extends CommandBase return; } - SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", - new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has started to invsee " + exactPlayer.getName() + " on " + UtilServer.getServerName() + "."), - true); + if (!UtilServer.isTestServer()) + { + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has started to invsee " + exactPlayer.getName() + " on " + UtilServer.getServerName() + "."), + true); + } Plugin.doInvsee(exactPlayer, caller); } } \ No newline at end of file diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/nameblacklist/commands/AddBlacklistCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/nameblacklist/commands/AddBlacklistCommand.java index f5285de66..d0c8e0c6e 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/nameblacklist/commands/AddBlacklistCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/nameblacklist/commands/AddBlacklistCommand.java @@ -6,6 +6,7 @@ import mineplex.core.command.CommandBase; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; import mineplex.core.slack.SlackAPI; import mineplex.core.slack.SlackMessage; import mineplex.core.slack.SlackTeam; @@ -33,9 +34,12 @@ public class AddBlacklistCommand extends CommandBase { Plugin.getRepository().add(blacklist, caller.getName()); UtilPlayer.message(caller, F.main("Clans", "Successfully added " + F.elem(blacklist) + " to the clan name blacklist.")); - SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", - new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has blacklisted the clan name " + blacklist + "."), - true); + if (!UtilServer.isTestServer()) + { + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has blacklisted the clan name " + blacklist + "."), + true); + } }); } else diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/pvptimer/PvPTimerManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/pvptimer/PvPTimerManager.java index 60cd9bb28..1b7a5e6d5 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/pvptimer/PvPTimerManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/pvptimer/PvPTimerManager.java @@ -27,6 +27,7 @@ import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.inventory.ItemStack; +import org.bukkit.util.Vector; import mineplex.core.MiniPlugin; import mineplex.core.ReflectivelyCreateMiniPlugin; @@ -47,6 +48,7 @@ import mineplex.core.slack.SlackTeam; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.game.clans.clans.ClansManager; +import mineplex.game.clans.clans.ClansUtility.ClanRelation; import mineplex.game.clans.core.repository.ClanTerritory; import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; @@ -111,9 +113,12 @@ public class PvPTimerManager extends MiniPlugin { disableTimer(target, true, true); UtilPlayer.message(caller, F.main(getName(), F.elem(target.getName()) + " no longer has a PvP Timer!")); - SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", - new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has removed " + target.getName() + "'s PvP Timer on " + UtilServer.getServerName() + "."), - true); + if (!UtilServer.isTestServer()) + { + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has removed " + target.getName() + "'s PvP Timer on " + UtilServer.getServerName() + "."), + true); + } } else { @@ -350,12 +355,14 @@ public class PvPTimerManager extends MiniPlugin ClanTerritory claimTo = ClansManager.getInstance().getClanUtility().getClaim(event.getTo()); ClanTerritory claimFrom = ClansManager.getInstance().getClanUtility().getClaim(event.getFrom()); - if (claimTo != null) + if (claimTo != null && ClansManager.getInstance().getClanUtility().getAccess(event.getPlayer(), event.getTo()) != ClanRelation.SELF) { if (claimFrom == null || !claimFrom.Owner.equals(claimTo.Owner)) { UtilPlayer.message(event.getPlayer(), F.main(getName(), "You cannot enter claimed land whilst protected from PvP. Run " + F.elem("/pvp") + " to enable PvP!")); - UtilAction.velocity(event.getPlayer(), UtilAlg.getTrajectory(event.getTo(), event.getFrom()).multiply(4), 1.5, true, 0.8, 0, 1.0, true); + Vector trajectory = UtilAlg.getTrajectory(event.getTo(), event.getFrom()).multiply(4); + event.getPlayer().teleport(event.getFrom().clone().add(trajectory)); + UtilAction.velocity(event.getPlayer(), trajectory, 1.5, true, 0.8, 0, 1.0, true); } } } @@ -370,7 +377,7 @@ public class PvPTimerManager extends MiniPlugin ClanTerritory claimTo = ClansManager.getInstance().getClanUtility().getClaim(event.getTo()); ClanTerritory claimFrom = ClansManager.getInstance().getClanUtility().getClaim(event.getFrom()); - if (claimTo != null) + if (claimTo != null && ClansManager.getInstance().getClanUtility().getAccess(event.getPlayer(), event.getTo()) != ClanRelation.SELF) { if (claimFrom == null || !claimFrom.Owner.equals(claimTo.Owner)) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/restart/RestartCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/restart/RestartCommand.java index 69b3994c8..d2e16e273 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/restart/RestartCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/restart/RestartCommand.java @@ -5,6 +5,10 @@ import org.bukkit.entity.Player; import mineplex.core.command.CommandBase; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.slack.SlackAPI; +import mineplex.core.slack.SlackMessage; +import mineplex.core.slack.SlackTeam; public class RestartCommand extends CommandBase { @@ -18,5 +22,11 @@ public class RestartCommand extends CommandBase { UtilPlayer.message(caller, F.main("Clans", "Initiating server restart!")); Plugin.restart(); + if (!UtilServer.isTestServer()) + { + SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#clans-commandspy", + new SlackMessage("Clans Command Logger", "crossed_swords", caller.getName() + " has initiated a restart of " + UtilServer.getServerName() + "."), + true); + } } } \ No newline at end of file diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java index 161584f22..95151d590 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java @@ -457,12 +457,12 @@ public class Spawn extends MiniPlugin public static Location getWestTown() { - return new Location(getSpawnWorld(), -440.91, 72, 23.08); + return new Location(getSpawnWorld(), -440.91, 68, 23.08); } public static Location getWestTownCenter() { - return new Location(getSpawnWorld(), -425, 73, 8); + return new Location(getSpawnWorld(), -425, 69, 8); } public static Location getEastTown()