diff --git a/pom.xml b/pom.xml index 6bff975..5fd861c 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ world.bentobox bentobox - 0.10.0-SNAPSHOT + 0.10.1-SNAPSHOT provided diff --git a/src/main/java/world/bentobox/bskyblock/Settings.java b/src/main/java/world/bentobox/bskyblock/Settings.java index 88acdb3..2a7824d 100644 --- a/src/main/java/world/bentobox/bskyblock/Settings.java +++ b/src/main/java/world/bentobox/bskyblock/Settings.java @@ -256,7 +256,24 @@ public class Settings implements DataObject, WorldSettings { @ConfigEntry(path = "island.respawn-on-island") private boolean respawnOnIsland = true; + // Sethome + @ConfigEntry(path = "island.sethome.nether.allow") + private boolean allowSetHomeInNether = true; + + @ConfigEntry(path = "island.sethome.nether.require-confirmation") + private boolean requireConfirmationToSetHomeInNether = true; + + @ConfigEntry(path = "island.sethome.the-end.allow") + private boolean allowSetHomeInTheEnd = true; + + @ConfigEntry(path = "island.sethome.the-end.require-confirmation") + private boolean requireConfirmationToSetHomeInTheEnd = true; + // Deaths + @ConfigComment("Whether deaths are counted or not.") + @ConfigEntry(path = "island.deaths.counted") + private boolean deathsCounted = true; + @ConfigComment("Maximum number of deaths to count. The death count can be used by add-ons.") @ConfigEntry(path = "island.deaths.max") private int deathsMax = 10; @@ -618,6 +635,46 @@ public class Settings implements DataObject, WorldSettings { return respawnOnIsland; } + /** + * @return the isDeathsCounted + */ + @Override + public boolean isDeathsCounted() { + return deathsCounted; + } + + /** + * @return the allowSetHomeInNether + */ + @Override + public boolean isAllowSetHomeInNether() { + return allowSetHomeInNether; + } + + /** + * @return the allowSetHomeInTheEnd + */ + @Override + public boolean isAllowSetHomeInTheEnd() { + return allowSetHomeInTheEnd; + } + + /** + * @return the requireConfirmationToSetHomeInNether + */ + @Override + public boolean isRequireConfirmationToSetHomeInNether() { + return requireConfirmationToSetHomeInNether; + } + + /** + * @return the requireConfirmationToSetHomeInTheEnd + */ + @Override + public boolean isRequireConfirmationToSetHomeInTheEnd() { + return requireConfirmationToSetHomeInTheEnd; + } + /** * @return the deathsMax */ @@ -975,6 +1032,13 @@ public class Settings implements DataObject, WorldSettings { this.respawnOnIsland = respawnOnIsland; } + /** + * @param deathsCounted the deathsCounted to set + */ + public void setDeathsCounted(boolean deathsCounted) { + this.deathsCounted = deathsCounted; + } + /** * @param deathsMax the deathsMax to set */ @@ -1024,6 +1088,34 @@ public class Settings implements DataObject, WorldSettings { this.closePanelOnClickOutside = closePanelOnClickOutside; } + /** + * @param allowSetHomeInNether the allowSetHomeInNether to set + */ + public void setAllowSetHomeInNether(boolean allowSetHomeInNether) { + this.allowSetHomeInNether = allowSetHomeInNether; + } + + /** + * @param allowSetHomeInTheEnd the allowSetHomeInTheEnd to set + */ + public void setAllowSetHomeInTheEnd(boolean allowSetHomeInTheEnd) { + this.allowSetHomeInTheEnd = allowSetHomeInTheEnd; + } + + /** + * @param requireConfirmationToSetHomeInNether the requireConfirmationToSetHomeInNether to set + */ + public void setRequireConfirmationToSetHomeInNether(boolean requireConfirmationToSetHomeInNether) { + this.requireConfirmationToSetHomeInNether = requireConfirmationToSetHomeInNether; + } + + /** + * @param requireConfirmationToSetHomeInTheEnd the requireConfirmationToSetHomeInTheEnd to set + */ + public void setRequireConfirmationToSetHomeInTheEnd(boolean requireConfirmationToSetHomeInTheEnd) { + this.requireConfirmationToSetHomeInTheEnd = requireConfirmationToSetHomeInTheEnd; + } + /** * @param resetEpoch the resetEpoch to set */ diff --git a/src/main/java/world/bentobox/bskyblock/commands/AdminCommand.java b/src/main/java/world/bentobox/bskyblock/commands/AdminCommand.java index 09dfa45..6977024 100644 --- a/src/main/java/world/bentobox/bskyblock/commands/AdminCommand.java +++ b/src/main/java/world/bentobox/bskyblock/commands/AdminCommand.java @@ -2,6 +2,7 @@ package world.bentobox.bskyblock.commands; import java.util.List; +import world.bentobox.bentobox.api.commands.admin.AdminWhyCommand; import world.bentobox.bskyblock.BSkyBlock; import world.bentobox.bentobox.api.commands.CompositeCommand; import world.bentobox.bentobox.api.commands.admin.AdminClearResetsAllCommand; @@ -61,6 +62,8 @@ public class AdminCommand extends CompositeCommand { new AdminClearResetsAllCommand(this); // Delete new AdminDeleteCommand(this); + // Why + new AdminWhyCommand(this); } @Override