add Punishment Reapply perm, change Report Ban to regular book
This commit is contained in:
parent
7902bacb04
commit
d703902606
@ -11,7 +11,7 @@ public enum Category
|
|||||||
Hacking("Hacking", Material.IRON_SWORD, true, 3, Punish.Perm.PUNISHMENT_COMMAND), // Illegal Mods
|
Hacking("Hacking", Material.IRON_SWORD, true, 3, Punish.Perm.PUNISHMENT_COMMAND), // Illegal Mods
|
||||||
Warning("Warning", Material.PAPER, false, 1, Punish.Perm.PUNISHMENT_COMMAND),
|
Warning("Warning", Material.PAPER, false, 1, Punish.Perm.PUNISHMENT_COMMAND),
|
||||||
PermMute("Permanent Mute", Material.BOOK_AND_QUILL, false, 1, Punish.Perm.FULL_PUNISHMENT_ACCESS),
|
PermMute("Permanent Mute", Material.BOOK_AND_QUILL, false, 1, Punish.Perm.FULL_PUNISHMENT_ACCESS),
|
||||||
ReportAbuse("Report Ban", Material.ENCHANTED_BOOK, false, 1, Punish.Perm.REPORT_BAN_ACCESS), // Abusing /report command
|
ReportAbuse("Report Ban", Material.BOOK, false, 1, Punish.Perm.REPORT_BAN_ACCESS), // Abusing /report command
|
||||||
Other("Permanent Ban", Material.REDSTONE_BLOCK, true, 1, Punish.Perm.FULL_PUNISHMENT_ACCESS); // Represents perm ban - (or old perm mutes)
|
Other("Permanent Ban", Material.REDSTONE_BLOCK, true, 1, Punish.Perm.FULL_PUNISHMENT_ACCESS); // Represents perm ban - (or old perm mutes)
|
||||||
|
|
||||||
String _name;
|
String _name;
|
||||||
|
@ -55,7 +55,8 @@ public class Punish extends MiniPlugin
|
|||||||
FULL_PUNISHMENT_ACCESS,
|
FULL_PUNISHMENT_ACCESS,
|
||||||
RULES_COMMAND,
|
RULES_COMMAND,
|
||||||
REPORT_BAN_ACCESS,
|
REPORT_BAN_ACCESS,
|
||||||
BYPASS_REMOVE_CONFIRMATION
|
BYPASS_REMOVE_CONFIRMATION,
|
||||||
|
PUNISHMENT_REAPPLY
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, PunishClient> _punishClients;
|
private Map<String, PunishClient> _punishClients;
|
||||||
@ -89,9 +90,13 @@ public class Punish extends MiniPlugin
|
|||||||
PermissionGroup.MOD.setPermission(Perm.FULL_PUNISHMENT_ACCESS, true, true);
|
PermissionGroup.MOD.setPermission(Perm.FULL_PUNISHMENT_ACCESS, true, true);
|
||||||
PermissionGroup.PLAYER.setPermission(Perm.RULES_COMMAND, true, true);
|
PermissionGroup.PLAYER.setPermission(Perm.RULES_COMMAND, true, true);
|
||||||
|
|
||||||
PermissionGroup.RC.setPermission(Perm.REPORT_BAN_ACCESS, false, true);
|
PermissionGroup.RC.setPermission(Perm.REPORT_BAN_ACCESS, true, true);
|
||||||
PermissionGroup.ADMIN.setPermission(Perm.REPORT_BAN_ACCESS, true, true);
|
PermissionGroup.ADMIN.setPermission(Perm.REPORT_BAN_ACCESS, true, true);
|
||||||
|
|
||||||
|
PermissionGroup.QA.setPermission(Perm.PUNISHMENT_REAPPLY, true, true);
|
||||||
|
PermissionGroup.RC.setPermission(Perm.PUNISHMENT_REAPPLY, true, true);
|
||||||
|
PermissionGroup.ADMIN.setPermission(Perm.PUNISHMENT_REAPPLY, true, true);
|
||||||
|
|
||||||
PermissionGroup.FN.setPermission(Perm.BYPASS_REMOVE_CONFIRMATION, true, true);
|
PermissionGroup.FN.setPermission(Perm.BYPASS_REMOVE_CONFIRMATION, true, true);
|
||||||
PermissionGroup.ADMIN.setPermission(Perm.BYPASS_REMOVE_CONFIRMATION, true, true);
|
PermissionGroup.ADMIN.setPermission(Perm.BYPASS_REMOVE_CONFIRMATION, true, true);
|
||||||
}
|
}
|
||||||
@ -293,7 +298,7 @@ public class Punish extends MiniPlugin
|
|||||||
{
|
{
|
||||||
new AddPunishCommand(finalPlayerName, severity, category.name(), sentence.name(), reason, duration, finalCallerName, caller != null ? caller.getUniqueId().toString() : null).publish();
|
new AddPunishCommand(finalPlayerName, severity, category.name(), sentence.name(), reason, duration, finalCallerName, caller != null ? caller.getUniqueId().toString() : null).publish();
|
||||||
});
|
});
|
||||||
final String durationString = UtilTime.convertString(finalDuration < 0 ? -1 : (long)(finalDuration * 3600000), 1, TimeUnit.FIT);
|
final String durationString = getDurationString(finalDuration);
|
||||||
|
|
||||||
if (sentence == PunishmentSentence.Ban)
|
if (sentence == PunishmentSentence.Ban)
|
||||||
{
|
{
|
||||||
@ -398,6 +403,11 @@ public class Punish extends MiniPlugin
|
|||||||
}, playerName, category.toString(), sentence, reason, duration, finalCallerName == null ? "Mineplex Anti-Cheat" : finalCallerName, severity);
|
}, playerName, category.toString(), sentence, reason, duration, finalCallerName == null ? "Mineplex Anti-Cheat" : finalCallerName, severity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getDurationString(long duration)
|
||||||
|
{
|
||||||
|
return UtilTime.convertString(duration < 0 ? -1 : duration * 3600000, 1, TimeUnit.FIT);
|
||||||
|
}
|
||||||
|
|
||||||
private void informOfPunish(String punishee, String msg)
|
private void informOfPunish(String punishee, String msg)
|
||||||
{
|
{
|
||||||
for (Player player : UtilServer.getPlayers())
|
for (Player player : UtilServer.getPlayers())
|
||||||
|
Loading…
Reference in New Issue
Block a user