From 738479b4eabfa270008b1c327d757089018b9a50 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Mon, 1 Jan 2018 02:37:38 -0500 Subject: [PATCH] Disable permanent bans for hacking offenses --- .../src/mineplex/core/punish/Punish.java | 5 ++++- .../src/mineplex/core/punish/UI/PunishPage.java | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java index 4bead83d3..67fde89c1 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/Punish.java @@ -82,7 +82,6 @@ public class Punish extends MiniPlugin private void generatePermissions() { - PermissionGroup.TRAINEE.setPermission(Perm.ALERT_PUNISHMENT, true, true); PermissionGroup.TRAINEE.setPermission(Perm.PUNISHMENT_COMMAND, true, true); PermissionGroup.MOD.setPermission(Perm.FULL_PUNISHMENT_ACCESS, true, true); @@ -132,7 +131,9 @@ public class Punish extends MiniPlugin String time = UtilTime.convertString(punishment.GetRemaining(), 0, TimeUnit.FIT); if (punishment.GetHours() == -1) + { time = "Permanent"; + } String reason = C.cRed + C.Bold + "You are banned for " + time + "\n" + C.cWhite + punishment.GetReason() + @@ -183,7 +184,9 @@ public class Punish extends MiniPlugin String time = UtilTime.convertString(punishment.GetRemaining(), 0, TimeUnit.FIT); if (punishment.GetHours() == -1) + { time = "Permanent"; + } String reason = C.cRed + C.Bold + "You are banned for " + time + "\n" + C.cWhite + punishment.GetReason() + diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java index 5e0da19c9..0abe700b4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java @@ -246,9 +246,8 @@ public class PunishPage extends CraftInventoryCustom implements Listener { flightSeverity = 3; } - } catch (Exception e) - { } + catch (Exception e) {} AddButton(41, new ShopItem(Material.INK_SACK, (byte) 1, "Severity 3", new String[] { @@ -571,17 +570,18 @@ public class PunishPage extends CraftInventoryCustom implements Listener } if (severity >= 2) { - //Permanent! - if (pastOffences.get(category).get(2) > 0) + if (pastOffences.get(category).get(2) > 1) { - return -1; + hours = 960; + } + else + { + hours = 720; } - - hours = 720; } if (severity >= 3) { - return -1; + hours = 960; } return hours;