Fixes bug where any player can reset island settings.

Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1219
This commit is contained in:
tastybento 2020-03-08 19:32:49 -07:00
parent 34ce9d3fc2
commit 9f046be8f6

View File

@ -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"))