|
|
|
@ -6,15 +6,14 @@ import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
|
|
|
|
|
import mineplex.core.common.Rank;
|
|
|
|
|
import mineplex.core.common.util.Callback;
|
|
|
|
|
import mineplex.core.common.util.F;
|
|
|
|
|
import mineplex.core.common.util.NautHashMap;
|
|
|
|
|
import mineplex.core.common.util.UtilTime;
|
|
|
|
|
import mineplex.core.common.util.UtilTime.TimeUnit;
|
|
|
|
|
import mineplex.core.punish.Category;
|
|
|
|
|
import mineplex.core.punish.Punish;
|
|
|
|
|
import mineplex.core.punish.PunishClient;
|
|
|
|
|
import mineplex.core.punish.PunishTrackUtil;
|
|
|
|
|
import mineplex.core.punish.Punishment;
|
|
|
|
|
import mineplex.core.punish.PunishmentResponse;
|
|
|
|
|
import mineplex.core.punish.PunishmentSorter;
|
|
|
|
@ -41,10 +40,11 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|
|
|
|
private String _target;
|
|
|
|
|
private String _reason;
|
|
|
|
|
private ShopItem _chatOffenseButton;
|
|
|
|
|
private ShopItem _advertisingButton;
|
|
|
|
|
private ShopItem _exploitingButton;
|
|
|
|
|
private ShopItem _hackingButton;
|
|
|
|
|
private ShopItem _otherButton;
|
|
|
|
|
private ShopItem _warningButton;
|
|
|
|
|
private ShopItem _permMuteButton;
|
|
|
|
|
private ShopItem _permBanButton;
|
|
|
|
|
|
|
|
|
|
public PunishPage(Punish plugin, Player player, String target, String reason)
|
|
|
|
|
{
|
|
|
|
@ -71,10 +71,8 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|
|
|
|
PunishClient client = _plugin.GetClient(_target);
|
|
|
|
|
|
|
|
|
|
int chatOffenseCount = 0;
|
|
|
|
|
int advertisingCount = 0;
|
|
|
|
|
int exploitingCount = 0;
|
|
|
|
|
int hackingCount = 0;
|
|
|
|
|
int otherCount = 0;
|
|
|
|
|
|
|
|
|
|
List<Entry<Category, Punishment>> punishments = new ArrayList<Entry<Category, Punishment>>();
|
|
|
|
|
|
|
|
|
@ -90,62 +88,183 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|
|
|
|
case ChatOffense:
|
|
|
|
|
chatOffenseCount = client.GetPunishments().get(category).size();
|
|
|
|
|
break;
|
|
|
|
|
case Advertisement:
|
|
|
|
|
advertisingCount = client.GetPunishments().get(category).size();
|
|
|
|
|
break;
|
|
|
|
|
case Exploiting:
|
|
|
|
|
exploitingCount = client.GetPunishments().get(category).size();
|
|
|
|
|
break;
|
|
|
|
|
case Hacking:
|
|
|
|
|
hackingCount = client.GetPunishments().get(category).size();
|
|
|
|
|
break;
|
|
|
|
|
case Other:
|
|
|
|
|
otherCount = client.GetPunishments().get(category).size();
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String examplePrefix = ChatColor.RESET + "" + ChatColor.GRAY;
|
|
|
|
|
String examplePrefixEx = ChatColor.RESET + "" + ChatColor.WHITE;
|
|
|
|
|
String examplePrefixNote = ChatColor.RESET + "" + ChatColor.DARK_GREEN;
|
|
|
|
|
|
|
|
|
|
_chatOffenseButton = new ShopItem(Material.BOOK_AND_QUILL, (byte)0, "Chat Offense", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + chatOffenseCount, examplePrefix + "Verbal Abuse, Spam, Harassment, Trolling, etc" }, 1, false, true);
|
|
|
|
|
_advertisingButton = new ShopItem(Material.SIGN, (byte)0, "Advertising", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + advertisingCount, examplePrefix + "Broadcasting another server ip." }, 1, false, true);
|
|
|
|
|
_exploitingButton = new ShopItem(Material.HOPPER, (byte)0, "Gameplay Offense", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + exploitingCount, examplePrefix + "Commmand/Map/Class/Skill exploits, etc" }, 1, false, true);
|
|
|
|
|
_hackingButton = new ShopItem(Material.IRON_SWORD, (byte)0, "Hacking", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + hackingCount, examplePrefix + "X-ray, Forcefield, Speed, Fly, Inventory Hacks, etc" }, 1, false, true);
|
|
|
|
|
_otherButton = new ShopItem(Material.BEACON, (byte)0, "Other", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + otherCount, examplePrefix + "Permanent punishments for unique cases." }, 1, false, true);
|
|
|
|
|
_exploitingButton = new ShopItem(Material.HOPPER, (byte)0, "General Offense", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + exploitingCount, examplePrefix + "Commmand/Map/Class/Skill exploits, etc" }, 1, false, true);
|
|
|
|
|
_hackingButton = new ShopItem(Material.IRON_SWORD, (byte)0, "Client Mod", new String[] { ChatColor.RESET + "Past offenses : " + ChatColor.YELLOW + hackingCount, examplePrefix + "X-ray, Forcefield, Speed, Fly, Inventory Hacks, etc" }, 1, false, true);
|
|
|
|
|
_warningButton = new ShopItem(Material.PAPER, (byte)0, "Warning", new String[] { }, 1, false, true);
|
|
|
|
|
_permMuteButton = new ShopItem(Material.EMERALD_BLOCK, (byte)0, "Permanent Mute", new String[] { }, 1, false, true);
|
|
|
|
|
_permBanButton = new ShopItem(Material.REDSTONE_BLOCK, (byte)0, "Permanent Ban", new String[] { }, 1, false, true);
|
|
|
|
|
|
|
|
|
|
getInventory().setItem(9, _chatOffenseButton.getHandle());
|
|
|
|
|
getInventory().setItem(11, _advertisingButton.getHandle());
|
|
|
|
|
getInventory().setItem(13, _exploitingButton.getHandle());
|
|
|
|
|
getInventory().setItem(15, _hackingButton.getHandle());
|
|
|
|
|
getInventory().setItem(17, _otherButton.getHandle());
|
|
|
|
|
getInventory().setItem(10, _chatOffenseButton.getHandle());
|
|
|
|
|
getInventory().setItem(12, _exploitingButton.getHandle());
|
|
|
|
|
getInventory().setItem(14, _hackingButton.getHandle());
|
|
|
|
|
|
|
|
|
|
long punishTime = PunishTrackUtil.GetPunishTime(_plugin.GetClient(_target), Category.ChatOffense, 1);
|
|
|
|
|
AddButton(18, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] { ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + F.time(UtilTime.convertString(punishTime * 3600000, 1, TimeUnit.FIT)), examplePrefix + "Spamming LOL LOLO LOLOL", examplePrefix + "F U Bob after bob tnt'd his base", examplePrefix + "Harassing admin to revoke a punishment" }, 1, false, true), new PunishButton(this, Category.ChatOffense, 1, false, punishTime));
|
|
|
|
|
punishTime = PunishTrackUtil.GetPunishTime(_plugin.GetClient(_target), Category.ChatOffense, 2);
|
|
|
|
|
AddButton(27, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] { ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + F.time(UtilTime.convertString(punishTime * 3600000, 1, TimeUnit.FIT)), examplePrefix + "Spamming 'I LIKE CATS I LIKE CATS I LIKE CATS' 10 times.", examplePrefix + "General rudeness between players.", examplePrefix + "'go fucking cry, you baby'.", examplePrefix + "Does not necessarily require swearing.", examplePrefix + "Shit admins are shit" }, 1, false, true), new PunishButton(this, Category.ChatOffense, 2, false, punishTime));
|
|
|
|
|
punishTime = PunishTrackUtil.GetPunishTime(_plugin.GetClient(_target), Category.ChatOffense, 3);
|
|
|
|
|
AddButton(36, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] { ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + F.time(UtilTime.convertString(punishTime * 3600000, 1, TimeUnit.FIT)), examplePrefix + "Spam bot", examplePrefix + "Severe abuse between players, back and forth argument in chat.", examplePrefix + "'fuck off, you admins are fucking awful', 'you should go and fucking die'" }, 1, false, true), new PunishButton(this, Category.ChatOffense, 3, false, punishTime));
|
|
|
|
|
//Mute
|
|
|
|
|
{
|
|
|
|
|
AddButton(19, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] {
|
|
|
|
|
ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + "2 Hours",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Spamming same thing in chat (3-5 times)",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Light Advertising;",
|
|
|
|
|
examplePrefixEx + " 'anyone want to play on minecade?'",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Trolling",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Constantly just talking crap",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Pestering staff in admin chat",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Accusing a player of hacks in chat",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use Severity 2 if many Severity 1 past offences",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.ChatOffense, 1, false, 2));
|
|
|
|
|
|
|
|
|
|
punishTime = PunishTrackUtil.GetPunishTime(_plugin.GetClient(_target), Category.Advertisement, 1);
|
|
|
|
|
AddButton(20, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] { ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + F.time(UtilTime.convertString(punishTime * 3600000, 1, TimeUnit.FIT)), examplePrefix + "Talking about another server, though asked not to." }, 1, false, true), new PunishButton(this, Category.Advertisement, 1, false, punishTime));
|
|
|
|
|
punishTime = PunishTrackUtil.GetPunishTime(_plugin.GetClient(_target), Category.Advertisement, 2);
|
|
|
|
|
AddButton(29, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] { ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Joining and asking other players to come check out another server." }, 1, false, true), new PunishButton(this, Category.Advertisement, 2, false, -1));
|
|
|
|
|
AddButton(38, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Joining the server and spamming 'www.crapexampleserver.com'"}, 1, false, true), new PunishButton(this, Category.Advertisement, 3, true, -1));
|
|
|
|
|
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
|
|
|
|
|
{
|
|
|
|
|
AddButton(28, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] {
|
|
|
|
|
ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + "24 Hours",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Spamming same thing in chat (6-14 times)",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Medium Advertising;",
|
|
|
|
|
examplePrefixEx + " 'check out my server! crap.server.net'",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Rudeness, arguing or abuse between players;",
|
|
|
|
|
examplePrefixEx + " 'go fucking cry, you baby'.",
|
|
|
|
|
examplePrefixEx + " 'SHIT ADMINS ARE SHIT!!!'",
|
|
|
|
|
examplePrefixEx + " 'youre terrible, learn to play'",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use Severity 3 if many Severity 2 past offences",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.ChatOffense, 2, false, 24));
|
|
|
|
|
|
|
|
|
|
punishTime = PunishTrackUtil.GetPunishTime(_plugin.GetClient(_target), Category.Exploiting, 1);
|
|
|
|
|
AddButton(22, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + F.time(UtilTime.convertString(punishTime * 3600000, 1, TimeUnit.FIT)), examplePrefix + "Hearing about a new exploit, and trying it out once.", examplePrefix + "For example, a command to start a world event." }, 1, false, true), new PunishButton(this, Category.Exploiting, 1, true, punishTime));
|
|
|
|
|
AddButton(31, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Something like... abusing a ban command.", examplePrefix + "Intentionally ruining experience for others via exploit." }, 1, false, true), new PunishButton(this, Category.Exploiting, 2, true, -1));
|
|
|
|
|
AddButton(40, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Ruins map economy completely by exploiting a dupe bug.", examplePrefix + "Crashing server via exploit." }, 1, false, true), new PunishButton(this, Category.Exploiting, 3, true, -1));
|
|
|
|
|
AddButton(37, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] {
|
|
|
|
|
ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + "Permanent",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Spamming same thing in chat (15+ times)",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Strong Advertising;",
|
|
|
|
|
examplePrefixEx + " 'JOIN MINECADE!! MINEPLEX SUCKS'",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Severe chat abuse towards players/staff",
|
|
|
|
|
examplePrefixEx + " 'go fucking die in a fire you fucking sack of shit'",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.ChatOffense, 3, false, -1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AddButton(24, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Using XRay on server" }, 1, false, true), new PunishButton(this, Category.Hacking, 1, true, -1));
|
|
|
|
|
AddButton(33, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Fly Hacks, Derp, Nuker, Speed." }, 1, false, true), new PunishButton(this, Category.Hacking, 2, true, -1));
|
|
|
|
|
AddButton(42, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Forcefield Hacks, V/No-Clip, Impersonating accounts, etc" }, 1, false, true), new PunishButton(this, Category.Hacking, 3, true, -1));
|
|
|
|
|
//General
|
|
|
|
|
{
|
|
|
|
|
AddButton(21, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "2 Hours",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Some Examples;",
|
|
|
|
|
examplePrefixEx + " Trolling (Gameplay Only)",
|
|
|
|
|
examplePrefixEx + " ",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use Severity 2 if many Severity 1 past offences",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Exploiting, 1, true, 12));
|
|
|
|
|
|
|
|
|
|
AddButton(26, new ShopItem(Material.REDSTONE_BLOCK, (byte)0, "Permanent Ban", new String[] { ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Better have a good reason for using this." }, 1, false, true), new PunishButton(this, Category.Other, 1, true, -1));
|
|
|
|
|
AddButton(35, new ShopItem(Material.EMERALD_BLOCK, (byte)0, "Permanent Mute", new String[] { ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + "PERMANENT", examplePrefix + "Better have a good reason for using this." }, 1, false, true), new PunishButton(this, Category.Other, 1, false, -1));
|
|
|
|
|
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
AddButton(30, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "24",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Examples;",
|
|
|
|
|
examplePrefixEx + " Team killing with water in Bridges",
|
|
|
|
|
examplePrefixEx + " Wither Skeleton block glitching in SSM to hide",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use Severity 3 if many Severity 2 past offences",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Exploiting, 2, true, 24));
|
|
|
|
|
|
|
|
|
|
AddButton(39, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "Permanent",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Examples;",
|
|
|
|
|
examplePrefixEx + " Repeatedly crashing server with glitch",
|
|
|
|
|
" ",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Exploiting, 3, true, -1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Hacks
|
|
|
|
|
{
|
|
|
|
|
AddButton(23, new ShopItem(Material.INK_SACK, (byte)2, "Severity 1", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "12 Hours",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Damage Indicators, Better Sprint, Minimaps",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use this for 1st Offence"
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Hacking, 1, true, 24));
|
|
|
|
|
|
|
|
|
|
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
|
|
|
|
|
{
|
|
|
|
|
AddButton(32, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "1 Week",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Examples;",
|
|
|
|
|
examplePrefixEx + " Damage Indicators",
|
|
|
|
|
examplePrefixEx + " Better Sprint",
|
|
|
|
|
examplePrefixEx + " Player Radar",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use this for 2nd Offence",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Use Severity 3 for 3rd Offence",
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Hacking, 2, true, 168));
|
|
|
|
|
|
|
|
|
|
AddButton(41, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "Permanent",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Examples;",
|
|
|
|
|
examplePrefixEx + " Fly Hack",
|
|
|
|
|
examplePrefixEx + " Speed Hack",
|
|
|
|
|
examplePrefixEx + " Forcefield",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Must be 100% sure they were hacking!"
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Hacking, 3, true, -1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//Other
|
|
|
|
|
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
|
|
|
|
|
{
|
|
|
|
|
AddButton(25, new ShopItem(Material.PAPER, (byte)0, "Warning", new String[] {
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefix + "Example Warning Input;",
|
|
|
|
|
examplePrefixEx + " Spam - Repeatedly writing MEOW",
|
|
|
|
|
examplePrefixEx + " Swearing - Saying 'fuck' and 'shit'",
|
|
|
|
|
examplePrefixEx + " Hack Accusation - Accused Tomp13 of hacking",
|
|
|
|
|
examplePrefixEx + " Trolling - was trying to make bob angry in chat",
|
|
|
|
|
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Warning, 1, false, 0));
|
|
|
|
|
|
|
|
|
|
AddButton(34, new ShopItem(Material.REDSTONE_BLOCK, (byte)0, "Permanent Ban", new String[] {
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "Permanent",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Must supply detailed reason for Ban."
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Other, 1, true, -1));
|
|
|
|
|
|
|
|
|
|
AddButton(43, new ShopItem(Material.EMERALD_BLOCK, (byte)0, "Permanent Mute", new String[] {
|
|
|
|
|
ChatColor.RESET + "Mute Duration: " + ChatColor.YELLOW + "Permanent",
|
|
|
|
|
" ",
|
|
|
|
|
examplePrefixNote + "Must supply detailed reason for Mute."
|
|
|
|
|
}, 1, false, true), new PunishButton(this, Category.Other, 1, false, -1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Collections.sort(punishments, new PunishmentSorter());
|
|
|
|
|
|
|
|
|
@ -153,6 +272,9 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|
|
|
|
|
|
|
|
|
for (Entry<Category, Punishment> punishmentEntry : punishments)
|
|
|
|
|
{
|
|
|
|
|
if (punishmentEntry.getKey() == Category.Advertisement)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (slot >= 54)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -163,17 +285,20 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|
|
|
|
case ChatOffense:
|
|
|
|
|
button = _chatOffenseButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
case Advertisement:
|
|
|
|
|
button = _advertisingButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
case Exploiting:
|
|
|
|
|
button = _exploitingButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
case Hacking:
|
|
|
|
|
button = _hackingButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
case Warning:
|
|
|
|
|
button = _warningButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
case PermMute:
|
|
|
|
|
button = _permMuteButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
case Other:
|
|
|
|
|
button = _otherButton.clone();
|
|
|
|
|
button = _permBanButton.clone();
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -181,18 +306,72 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
|
|
|
|
|
|
|
|
|
Punishment punishment = punishmentEntry.getValue();
|
|
|
|
|
|
|
|
|
|
if (punishmentEntry.getKey() == Category.ChatOffense ||
|
|
|
|
|
punishmentEntry.getKey() == Category.Exploiting ||
|
|
|
|
|
punishmentEntry.getKey() == Category.Hacking)
|
|
|
|
|
{
|
|
|
|
|
if (punishment.GetRemoved())
|
|
|
|
|
{
|
|
|
|
|
button.SetLore(new String[]
|
|
|
|
|
{
|
|
|
|
|
ChatColor.RESET + "Punishment Type: " + ChatColor.YELLOW + punishment.GetCategory().toString(),
|
|
|
|
|
ChatColor.RESET + "Severity: " + ChatColor.YELLOW + punishment.GetSeverity(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Reason: " + ChatColor.YELLOW + punishment.GetReason(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Admin: " + ChatColor.YELLOW + punishment.GetAdmin(),
|
|
|
|
|
ChatColor.RESET + "Date of Ban: " + ChatColor.YELLOW + UtilTime.when(punishment.GetTime()),
|
|
|
|
|
ChatColor.RESET + "Ban Duration: " + (punishment.GetCategory() == Category.Other ? ChatColor.RED + "PERMANENT" : (ChatColor.RED + "" + F.time(UtilTime.convertString((long)(punishment.GetHours() * 3600000), 1, TimeUnit.FIT)))),
|
|
|
|
|
ChatColor.RESET + "Expires In: " + ChatColor.RED + (punishment.GetCategory() == Category.Other ? "NEVER" : (punishment.GetRemaining() > 0 ? F.time(UtilTime.convertString((long)(punishment.GetRemaining()), 1, TimeUnit.FIT)) : ChatColor.GREEN + "EXPIRED")),
|
|
|
|
|
ChatColor.RESET + "Date: " + ChatColor.YELLOW + UtilTime.when(punishment.GetTime()),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Removed by: " + (punishment.GetRemoved() ? ChatColor.GREEN + punishment.GetRemoveAdmin() : ChatColor.RED + "Not Removed"),
|
|
|
|
|
ChatColor.RESET + "Remove Reason: " + (punishment.GetRemoved() ? ChatColor.GREEN + punishment.GetRemoveReason() : ChatColor.RED + "Not Removed"),
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
button.SetLore(new String[]
|
|
|
|
|
{
|
|
|
|
|
ChatColor.RESET + "Punishment Type: " + ChatColor.YELLOW + punishment.GetCategory().toString(),
|
|
|
|
|
ChatColor.RESET + "Severity: " + ChatColor.YELLOW + punishment.GetSeverity(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Reason: " + ChatColor.YELLOW + punishment.GetReason(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Admin: " + ChatColor.YELLOW + punishment.GetAdmin(),
|
|
|
|
|
ChatColor.RESET + "Date: " + ChatColor.YELLOW + UtilTime.when(punishment.GetTime()),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (punishment.GetRemoved())
|
|
|
|
|
{
|
|
|
|
|
button.SetLore(new String[]
|
|
|
|
|
{
|
|
|
|
|
ChatColor.RESET + "Punishment Type: " + ChatColor.YELLOW + punishment.GetCategory().toString(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Reason: " + ChatColor.YELLOW + punishment.GetReason(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Admin: " + ChatColor.YELLOW + punishment.GetAdmin(),
|
|
|
|
|
ChatColor.RESET + "Date: " + ChatColor.YELLOW + UtilTime.when(punishment.GetTime()),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Removed by: " + (punishment.GetRemoved() ? ChatColor.GREEN + punishment.GetRemoveAdmin() : ChatColor.RED + "Not Removed"),
|
|
|
|
|
ChatColor.RESET + "Remove Reason: " + (punishment.GetRemoved() ? ChatColor.GREEN + punishment.GetRemoveReason() : ChatColor.RED + "Not Removed"),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
button.SetLore(new String[]
|
|
|
|
|
{
|
|
|
|
|
ChatColor.RESET + "Punishment Type: " + ChatColor.YELLOW + punishment.GetCategory().toString(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Reason: " + ChatColor.YELLOW + punishment.GetReason(),
|
|
|
|
|
" ",
|
|
|
|
|
ChatColor.RESET + "Admin: " + ChatColor.YELLOW + punishment.GetAdmin(),
|
|
|
|
|
ChatColor.RESET + "Date: " + ChatColor.YELLOW + UtilTime.when(punishment.GetTime()),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((punishment.GetHours() == -1 || punishment.GetRemaining() > 0) && !punishment.GetRemoved() && punishment.GetActive())
|
|
|
|
|
{
|
|
|
|
|