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