1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Change permission names

This commit is contained in:
Shy
2024-06-08 18:51:15 +02:00
parent b0cc014154
commit 151ca74dc7
2 changed files with 4 additions and 4 deletions
@@ -207,7 +207,7 @@ public class SModMenu extends PageableCustomInventory {
if (punishment.wasCancelled()){
lore.add(applyFormatting(Component.text("Cancelled by: ").color(NamedTextColor.RED).append(Component.text(PlayerUtil.offlinePlayerName(punishment.cancelledBy())).color(NamedTextColor.GOLD))));
} else if (punishment.isActive()) {
if ((punishment.type == PunishmentType.BAN && player.hasPermission("smod.cancelBan")) || (punishment.type == PunishmentType.MUTE && player.hasPermission("smod.cancelMute"))){
if ((punishment.type == PunishmentType.BAN && player.hasPermission("smod.unban")) || (punishment.type == PunishmentType.MUTE && player.hasPermission("smod.unmute"))){
lore.add(Component.empty());
lore.add(applyFormatting(Component.text("\u00BB Click to cancel punishment").color(NamedTextColor.GOLD)));
}
@@ -233,7 +233,7 @@ public class SModMenu extends PageableCustomInventory {
final Punishment punishment = punishments.get(ci);
final ItemStack item = createPunishmentItem(punishment);
if (punishment.isActive()){
if ((punishment.type == PunishmentType.BAN && player.hasPermission("smod.cancelBan")) || (punishment.type == PunishmentType.MUTE && player.hasPermission("smod.cancelMute"))) {
if ((punishment.type == PunishmentType.BAN && player.hasPermission("smod.unban")) || (punishment.type == PunishmentType.MUTE && player.hasPermission("smod.unmute"))) {
item.editMeta(meta -> meta.getPersistentDataContainer().set(PUNISHMENT_STORE_KEY, PersistentDataType.LONG, punishment.time));
}
}
+2 -2
View File
@@ -58,10 +58,10 @@ permissions:
smod.notifications:
default: op
description: Allows the player to be notified when a punishment is issued.
smod.cancelMute:
smod.unmute:
default: op
description: Allows the player to unmute other players.
smod.cancelBan:
smod.unban:
default: op
description: Allows the player to unban other players.
smod.logs: