mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
Merge pull request #83 from AtlasMediaGroup/FS-239-to-FS-242
Logs even more punishment types (FS-239, FS-240, FS-241, FS-242)
This commit is contained in:
commit
f57fc56f4a
@ -1,6 +1,8 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
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.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -75,9 +77,11 @@ public class Command_blockcmd extends FreedomCommand
|
|||||||
FPlayer playerdata = plugin.pl.getPlayer(player);
|
FPlayer playerdata = plugin.pl.getPlayer(player);
|
||||||
if (!playerdata.allCommandsBlocked())
|
if (!playerdata.allCommandsBlocked())
|
||||||
{
|
{
|
||||||
playerdata.setCommandsBlocked(true);
|
|
||||||
FUtil.adminAction(sender.getName(), "Blocking all commands for " + player.getName(), true);
|
FUtil.adminAction(sender.getName(), "Blocking all commands for " + player.getName(), true);
|
||||||
|
playerdata.setCommandsBlocked(true);
|
||||||
msg("Blocked commands for " + player.getName() + ".");
|
msg("Blocked commands for " + player.getName() + ".");
|
||||||
|
|
||||||
|
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.BLOCKCMD, null));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
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.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
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(player2, "Your block modification abilities have been blocked.", ChatColor.RED);
|
||||||
msg("Blocked all block modification abilities for " + player2.getName());
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
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.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
@ -125,6 +127,7 @@ public class Command_blockpvp extends FreedomCommand
|
|||||||
{
|
{
|
||||||
Command_smite.smite(sender, p, reason);
|
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(p, "Your PVP has been disabled.", ChatColor.RED);
|
||||||
msg("Disabled PVP for " + p.getName());
|
msg("Disabled PVP for " + p.getName());
|
||||||
|
@ -5,6 +5,8 @@ import java.util.Arrays;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
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.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -90,6 +92,15 @@ public class Command_cage extends FreedomCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (outerMaterial == Material.PLAYER_HEAD)
|
||||||
|
{
|
||||||
|
FUtil.adminAction(sender.getName(), "Caging " + player.getName() + " in " + skullName, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
|
||||||
|
}
|
||||||
|
|
||||||
Location location = player.getLocation().clone().add(0.0, 1.0, 0.0);
|
Location location = player.getLocation().clone().add(0.0, 1.0, 0.0);
|
||||||
|
|
||||||
if (skullName != null)
|
if (skullName != null)
|
||||||
@ -100,17 +111,9 @@ public class Command_cage extends FreedomCommand
|
|||||||
{
|
{
|
||||||
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial);
|
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
|
|
||||||
if (outerMaterial == Material.PLAYER_HEAD)
|
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.CAGE, null));
|
||||||
{
|
|
||||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName() + " in " + skullName, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package me.totalfreedom.totalfreedommod.command;
|
package me.totalfreedom.totalfreedommod.command;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
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.rank.Rank;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
import org.bukkit.ChatColor;
|
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);
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
playerdata.startOrbiting(strength);
|
playerdata.startOrbiting(strength);
|
||||||
|
|
||||||
player.setVelocity(new Vector(0, strength, 0));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,5 +8,10 @@ public enum PunishmentType
|
|||||||
TEMPBAN,
|
TEMPBAN,
|
||||||
BAN,
|
BAN,
|
||||||
DOOM,
|
DOOM,
|
||||||
WARN
|
WARN,
|
||||||
|
CAGE,
|
||||||
|
BLOCKEDIT,
|
||||||
|
BLOCKPVP,
|
||||||
|
BLOCKCMD,
|
||||||
|
ORBIT
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user