From 9f046be8f60c6491378c780b275ac04a394eb0d7 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 8 Mar 2020 19:32:49 -0700 Subject: [PATCH] Fixes bug where any player can reset island settings. Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1219 --- .../world/bentobox/bentobox/panels/settings/SettingsTab.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java b/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java index 6316e57f4..0c66f2d4c 100644 --- a/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java +++ b/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java @@ -163,7 +163,7 @@ public class SettingsTab implements Tab, ClickHandler { .build()); } // Add the reset everything to default - it's only in the player's settings panel - if (island != null) { + if (island != null && user.getUniqueId().equals(island.getOwner())) { icons.put(8, new PanelItemBuilder().icon(Material.TNT) .name(user.getTranslation(PROTECTION_PANEL + "reset-to-default.name")) .description(user.getTranslation(PROTECTION_PANEL + "reset-to-default.description"))