mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 06:33:49 +01:00
Saves command rank settings to bentobox config.yml
https://github.com/BentoBoxWorld/BentoBox/issues/657
This commit is contained in:
parent
4e0e283ace
commit
2b2ee7e42c
@ -110,7 +110,7 @@ public class BentoBox extends JavaPlugin {
|
||||
return;
|
||||
}
|
||||
// Saving the config now.
|
||||
new Config<>(this, Settings.class).saveConfigObject(settings);
|
||||
saveConfig();
|
||||
|
||||
// Start Database managers
|
||||
playersManager = new PlayersManager(this);
|
||||
@ -333,6 +333,11 @@ public class BentoBox extends JavaPlugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveConfig() {
|
||||
if (settings != null) new Config<>(this, Settings.class).saveConfigObject(settings);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the notifier
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ public class Settings implements DataObject {
|
||||
private Set<String> fakePlayers = new HashSet<>();
|
||||
|
||||
@ConfigComment("Rank required to use a command. e.g., use the invite command. Default is owner rank is required.")
|
||||
@ConfigEntry(path = "general.rank-command", experimental = true)
|
||||
@ConfigEntry(path = "general.rank-command")
|
||||
private Map<String, Integer> rankCommand = new HashMap<>();
|
||||
|
||||
@ConfigEntry(path = "panel.close-on-click-outside")
|
||||
|
@ -57,6 +57,9 @@ public class CommandCycleClick implements ClickHandler {
|
||||
}
|
||||
// Apply change to panel
|
||||
panel.getInventory().setItem(slot, commandRankClickListener.getPanelItem(command, user).getItem());
|
||||
// Save config
|
||||
plugin.saveConfig();
|
||||
|
||||
} else {
|
||||
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user