Skip to content

Commit ac8ec8c

Browse files
Fix missing permission check and default permission in plugin.yml
1 parent 37c3805 commit ac8ec8c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/main/java/me/danjono/inventoryrollback/listeners/ClickGUI.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,12 @@ public void run() {
618618

619619
//Clicked icon to overwrite player ender chest with backup data
620620
else if (icon.getType().equals(Buttons.getRestoreAllInventoryIcon())) {
621+
// Perm check
622+
if (!staff.hasPermission("inventoryrollbackplus.restore")) {
623+
staff.sendMessage(MessageData.getPluginPrefix() + MessageData.getNoPermission());
624+
return;
625+
}
626+
621627
if (offlinePlayer.isOnline()) {
622628
Player player = (Player) offlinePlayer;
623629

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ permissions:
5959
children:
6060
inventoryrollbackplus.viewbackups: true
6161
inventoryrollbackplus.restore.teleport:
62-
default: true
62+
default: op
6363
description: Allow the staff member to teleport to the location where the backup was saved
6464
inventoryrollbackplus.forcebackup:
6565
description: Forces a backup for an online player.

0 commit comments

Comments
 (0)