mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Even more punishment log types
Here's what I've changed in this commit: - Adds /blockcmd to the punishment log (FS-239) - Adds /blockedit and /blockpvp to the punishment log (FS-240) - Adds /cage to the punishment log (FS-241) - Adds /orbit to the punishment log (FS-242) - Changes the order of operations in some commands to be a bit more consistent
This commit is contained in:
parent
4e78027f0c
commit
e1c3bad4d0
@ -1,6 +1,8 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -75,9 +77,11 @@ public class Command_blockcmd extends FreedomCommand
|
||||
FPlayer playerdata = plugin.pl.getPlayer(player);
|
||||
if (!playerdata.allCommandsBlocked())
|
||||
{
|
||||
playerdata.setCommandsBlocked(true);
|
||||
FUtil.adminAction(sender.getName(), "Blocking all commands for " + player.getName(), true);
|
||||
playerdata.setCommandsBlocked(true);
|
||||
msg("Blocked commands for " + player.getName() + ".");
|
||||
|
||||
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.BLOCKCMD, null));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,6 +1,8 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
@ -128,6 +130,8 @@ public class Command_blockedit extends FreedomCommand
|
||||
|
||||
msg(player2, "Your block modification abilities have been blocked.", ChatColor.RED);
|
||||
msg("Blocked all block modification abilities for " + player2.getName());
|
||||
|
||||
plugin.pul.logPunishment(new Punishment(player2.getName(), FUtil.getIp(player2), sender.getName(), PunishmentType.BLOCKEDIT, null));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
@ -125,6 +127,7 @@ public class Command_blockpvp extends FreedomCommand
|
||||
{
|
||||
Command_smite.smite(sender, p, reason);
|
||||
}
|
||||
plugin.pul.logPunishment(new Punishment(p.getName(), FUtil.getIp(p), sender.getName(), PunishmentType.BLOCKPVP, null));
|
||||
|
||||
msg(p, "Your PVP has been disabled.", ChatColor.RED);
|
||||
msg("Disabled PVP for " + p.getName());
|
||||
|
@ -5,6 +5,8 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -111,6 +113,8 @@ public class Command_cage extends FreedomCommand
|
||||
{
|
||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
|
||||
}
|
||||
|
||||
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.CAGE, null));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||
import me.totalfreedom.totalfreedommod.punishments.Punishment;
|
||||
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -56,11 +58,13 @@ public class Command_orbit extends FreedomCommand
|
||||
}
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Orbiting " + player.getName(), false);
|
||||
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
playerdata.startOrbiting(strength);
|
||||
|
||||
player.setVelocity(new Vector(0, strength, 0));
|
||||
FUtil.adminAction(sender.getName(), "Orbiting " + player.getName(), false);
|
||||
|
||||
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.ORBIT, null));
|
||||
return true;
|
||||
}
|
||||
}
|
@ -8,5 +8,10 @@ public enum PunishmentType
|
||||
TEMPBAN,
|
||||
BAN,
|
||||
DOOM,
|
||||
WARN
|
||||
WARN,
|
||||
CAGE,
|
||||
BLOCKEDIT,
|
||||
BLOCKPVP,
|
||||
BLOCKCMD,
|
||||
ORBIT
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user