mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-24 00:51:40 +01:00
Added a "reset all the settings" button to the player Settings Panel
Implements https://github.com/BentoBoxWorld/BentoBox/issues/1011
This commit is contained in:
parent
5ef74bd0f4
commit
6607060b99
@ -162,6 +162,17 @@ public class SettingsTab implements Tab, ClickHandler {
|
||||
.clickHandler(this)
|
||||
.build());
|
||||
}
|
||||
// Add the reset everything to default - it's only in the player's settings panel
|
||||
if (island != null) {
|
||||
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"))
|
||||
.clickHandler((panel, user1, clickType, slot) -> {
|
||||
island.setFlagsDefaults();
|
||||
return true;
|
||||
})
|
||||
.build());
|
||||
}
|
||||
return icons;
|
||||
}
|
||||
|
||||
|
@ -1139,6 +1139,11 @@ protection:
|
||||
name: "&cExpert Settings"
|
||||
description: "&aDisplays all the available settings."
|
||||
click-to-switch: "&eClick &ato switch to the &r[next]&r&a."
|
||||
reset-to-default:
|
||||
name: "&cReset to default"
|
||||
description: |+
|
||||
&aResets &c&lALL &r&athe settings to their
|
||||
&adefault value.
|
||||
PROTECTION:
|
||||
title: "&6Protection"
|
||||
description: |-
|
||||
|
Loading…
Reference in New Issue
Block a user