Modify Shop coordinates to match new map, disable command logging in test servers and log some additional commands, and tweak the PvP timer system to allow entry to one's own claims and to block any exploitative entry that may have been previously possible
This commit is contained in:
parent
698f0e79b4
commit
aa30bc1b63
@ -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<ClansBanManager, ClansBanShop>
|
||||
getPlugin().unban(_victimClient, ban, getPlayer().getName(), _reason, () ->
|
||||
{
|
||||
playAcceptSound(player);
|
||||
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 + "."),
|
||||
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<ClansBanManager, ClansBanShop>
|
||||
if (ban.isPresent())
|
||||
{
|
||||
playAcceptSound(getPlayer());
|
||||
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(_time)),
|
||||
new SlackMessage("Clans Command Logger", "crossed_swords", getPlayer().getName() + " has blacklisted " + _victimName + " for '" + _reason + "'. Duration: " + UtilTime.MakeStr(_permanent ? -1 : _time)),
|
||||
true);
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
else
|
||||
|
@ -54,6 +54,8 @@ public class ClansAdmin
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UtilServer.isTestServer())
|
||||
{
|
||||
StringBuilder cmd = new StringBuilder("/c");
|
||||
for (String a : args)
|
||||
{
|
||||
@ -69,6 +71,7 @@ public class ClansAdmin
|
||||
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);
|
||||
|
@ -94,9 +94,12 @@ public class InvseeCommand extends CommandBase<InvseeManager>
|
||||
return;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
@ -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<ClansBlacklist>
|
||||
{
|
||||
Plugin.getRepository().add(blacklist, caller.getName());
|
||||
UtilPlayer.message(caller, F.main("Clans", "Successfully added " + F.elem(blacklist) + " to the clan name blacklist."));
|
||||
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
|
||||
|
@ -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,10 +113,13 @@ 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!"));
|
||||
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
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(getName(), F.elem(target.getName()) + " does not have a PvP Timer!"));
|
||||
@ -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))
|
||||
{
|
||||
|
@ -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<RestartManager>
|
||||
{
|
||||
@ -18,5 +22,11 @@ public class RestartCommand extends CommandBase<RestartManager>
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user