Updated punish to be even less confuse.

This commit is contained in:
Chiss 2014-11-12 09:49:03 +11:00
parent d7141e4943
commit 71a93bead5
2 changed files with 43 additions and 67 deletions

View File

@ -78,12 +78,12 @@ public class PunishPage extends CraftInventoryCustom implements Listener
{ {
//Initialise Offences //Initialise Offences
offenseMap.put(category, new HashMap<Integer, Integer>()); offenseMap.put(category, new HashMap<Integer, Integer>());
offenseMap.get(category).put(1, 0); offenseMap.get(category).put(1, 0);
offenseMap.get(category).put(2, 0); offenseMap.get(category).put(2, 0);
offenseMap.get(category).put(3, 0); offenseMap.get(category).put(3, 0);
} }
List<Entry<Category, Punishment>> punishments = new ArrayList<Entry<Category, Punishment>>(); List<Entry<Category, Punishment>> punishments = new ArrayList<Entry<Category, Punishment>>();
for (Category category : client.GetPunishments().keySet()) for (Category category : client.GetPunishments().keySet())
@ -91,7 +91,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
for (Punishment punishment : client.GetPunishments().get(category)) for (Punishment punishment : client.GetPunishments().get(category))
{ {
punishments.add(new AbstractMap.SimpleEntry<Category, Punishment>(category, punishment)); punishments.add(new AbstractMap.SimpleEntry<Category, Punishment>(category, punishment));
//Count by Severity //Count by Severity
if (!punishment.GetRemoved() && punishment.GetSeverity() > 0 && punishment.GetSeverity() < 4) if (!punishment.GetRemoved() && punishment.GetSeverity() > 0 && punishment.GetSeverity() < 4)
offenseMap.get(category).put(punishment.GetSeverity(), 1 + offenseMap.get(category).get(punishment.GetSeverity())); offenseMap.get(category).put(punishment.GetSeverity(), 1 + offenseMap.get(category).get(punishment.GetSeverity()));
@ -187,26 +187,26 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefixEx + " Abusing an exploit to gain an advantage", examplePrefixEx + " Abusing an exploit to gain an advantage",
}, 1, false, true), new PunishButton(this, Category.Exploiting, 1, true, getDuration(Category.Exploiting, 1, offenseMap))); }, 1, false, true), new PunishButton(this, Category.Exploiting, 1, true, getDuration(Category.Exploiting, 1, offenseMap)));
// if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR)) // if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
// { // {
// //
// AddButton(30, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] { // AddButton(30, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] {
// ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Exploiting).get(2), // ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Exploiting).get(2),
// ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Exploiting, 2, offenseMap), // ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Exploiting, 2, offenseMap),
// " ", // " ",
// examplePrefix + "Empty", // examplePrefix + "Empty",
// examplePrefixEx + " Currently no reason to use this :)", // examplePrefixEx + " Currently no reason to use this :)",
// }, 1, false, true), new PunishButton(this, Category.Exploiting, 2, true, getDuration(Category.Exploiting, 2, offenseMap))); // }, 1, false, true), new PunishButton(this, Category.Exploiting, 2, true, getDuration(Category.Exploiting, 2, offenseMap)));
// //
// AddButton(39, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] { // AddButton(39, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", new String[] {
// ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Exploiting).get(3), // ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Exploiting).get(3),
// ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Exploiting, 3, offenseMap), // ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Exploiting, 3, offenseMap),
// " ", // " ",
// examplePrefix + "Server Lag/Crash", // examplePrefix + "Server Lag/Crash",
// examplePrefixEx + " Abusing a bug to lag or crash a server", // examplePrefixEx + " Abusing a bug to lag or crash a server",
// " ", // " ",
// }, 1, false, true), new PunishButton(this, Category.Exploiting, 3, true, getDuration(Category.Exploiting, 3, offenseMap))); // }, 1, false, true), new PunishButton(this, Category.Exploiting, 3, true, getDuration(Category.Exploiting, 3, offenseMap)));
// } // }
} }
//XXX Hacks //XXX Hacks
@ -223,23 +223,8 @@ public class PunishPage extends CraftInventoryCustom implements Listener
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR)) if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
{ {
//Sev 2
String[] sev2 = new String[]
{
ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Hacking).get(2),
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Hacking, 2, offenseMap),
" ",
examplePrefix + "Hacks;",
examplePrefixEx + " Fly Hack",
examplePrefixEx + " Forcefield",
examplePrefixEx + " Speed Hack",
examplePrefixEx + " Reach Hack",
" ",
C.cAqua + "Use this for punishing",
C.cAqua + "Fly Hacks on this server!",
};
String[] sev2Strict = new String[] AddButton(32, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2",new String[]
{ {
ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Hacking).get(2), ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Hacking).get(2),
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Hacking, 2, offenseMap), ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Hacking, 2, offenseMap),
@ -249,37 +234,28 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefixEx + " Speed Hack", examplePrefixEx + " Speed Hack",
examplePrefixEx + " Reach Hack", examplePrefixEx + " Reach Hack",
" ", " ",
C.cRed + "Do not use this for punishing", examplePrefix + "Hack Reports;",
C.cRed + "Fly Hacks on this server!" examplePrefixEx + " Forum Report",
}; examplePrefixEx + " Staff Report",
}
AddButton(32, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2",
(AntiHack.Instance.isStrict() ? sev2Strict : sev2)
, 1, false, true), new PunishButton(this, Category.Hacking, 2, true, getDuration(Category.Hacking, 2, offenseMap))); , 1, false, true), new PunishButton(this, Category.Hacking, 2, true, getDuration(Category.Hacking, 2, offenseMap)));
//Sev 3
String[] sev3 = new String[] int flightSeverity = (AntiHack.Instance.isStrict() ? 3 : 2);
{
ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Hacking).get(3),
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Hacking, 3, offenseMap),
" ",
C.cRed + "Do not use this for punishing",
C.cRed + "Fly Hacks on this server!"
};
String[] sev3Strict = new String[] AddButton(41, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3",new String[]
{ {
ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Hacking).get(3), ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.Hacking).get(flightSeverity),
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Hacking, 3, offenseMap), ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + getDurationString(Category.Hacking, flightSeverity, offenseMap),
" ", " ",
C.cAqua + "Use this for punishing", examplePrefix + "Hacks;",
C.cAqua + "Fly Hacks on this server!", examplePrefixEx + " Fly Hack",
}; " ",
C.cRed + C.Bold + "WARNING;",
AddButton(41, new ShopItem(Material.INK_SACK, (byte)1, "Severity 3", C.cRed + "Use Severity 2 for Forum/Staff Reports"
(AntiHack.Instance.isStrict() ? sev3Strict : sev3) }
, 1, false, true), new PunishButton(this, Category.Hacking, 3, true, getDuration(Category.Hacking, 3, offenseMap))); , 1, false, true), new PunishButton(this, Category.Hacking, 3, true, getDuration(Category.Hacking, flightSeverity, offenseMap)));
} }
} }

View File

@ -57,7 +57,7 @@ public class KitWolf extends SmashKit
{ {
ChatColor.RESET + "Leap forward with great power.", ChatColor.RESET + "Leap forward with great power.",
ChatColor.RESET + "If you collide with an enemy, you deal", ChatColor.RESET + "If you collide with an enemy, you deal",
ChatColor.RESET + "damage to them. If they are being tacked", ChatColor.RESET + "damage to them. If they are being tackled",
ChatColor.RESET + "by a cub, it deals 300% Knockback.", ChatColor.RESET + "by a cub, it deals 300% Knockback.",
})); }));