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:
@@ -207,7 +207,7 @@ public class SModMenu extends PageableCustomInventory {
|
|||||||
if (punishment.wasCancelled()){
|
if (punishment.wasCancelled()){
|
||||||
lore.add(applyFormatting(Component.text("Cancelled by: ").color(NamedTextColor.RED).append(Component.text(PlayerUtil.offlinePlayerName(punishment.cancelledBy())).color(NamedTextColor.GOLD))));
|
lore.add(applyFormatting(Component.text("Cancelled by: ").color(NamedTextColor.RED).append(Component.text(PlayerUtil.offlinePlayerName(punishment.cancelledBy())).color(NamedTextColor.GOLD))));
|
||||||
} else if (punishment.isActive()) {
|
} 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(Component.empty());
|
||||||
lore.add(applyFormatting(Component.text("\u00BB Click to cancel punishment").color(NamedTextColor.GOLD)));
|
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 Punishment punishment = punishments.get(ci);
|
||||||
final ItemStack item = createPunishmentItem(punishment);
|
final ItemStack item = createPunishmentItem(punishment);
|
||||||
if (punishment.isActive()){
|
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));
|
item.editMeta(meta -> meta.getPersistentDataContainer().set(PUNISHMENT_STORE_KEY, PersistentDataType.LONG, punishment.time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ permissions:
|
|||||||
smod.notifications:
|
smod.notifications:
|
||||||
default: op
|
default: op
|
||||||
description: Allows the player to be notified when a punishment is issued.
|
description: Allows the player to be notified when a punishment is issued.
|
||||||
smod.cancelMute:
|
smod.unmute:
|
||||||
default: op
|
default: op
|
||||||
description: Allows the player to unmute other players.
|
description: Allows the player to unmute other players.
|
||||||
smod.cancelBan:
|
smod.unban:
|
||||||
default: op
|
default: op
|
||||||
description: Allows the player to unban other players.
|
description: Allows the player to unban other players.
|
||||||
smod.logs:
|
smod.logs:
|
||||||
|
|||||||
Reference in New Issue
Block a user