Skip to content

Commit

Permalink
Fixed a problem where the 'config.yml' file was reset if players ente…
Browse files Browse the repository at this point in the history
…red combat in unconfigured worlds.
  • Loading branch information
needkg committed Sep 14, 2024
1 parent 4cb3f25 commit 4512276
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void addWorldToConfig(String worldName) {
configFile.setValue("worlds." + worldName + ".vault.lose-money-on-death.only-at-night", true);
configFile.setValue("worlds." + worldName + ".vault.lose-money-on-death.only-in-configured-worlds", true);
configFile.setValue("worlds." + worldName + ".vault.lose-money-on-death.killer-reward-money", true);
configFile.setValue("worlds." + worldName + ".griefprevention.pvp-in-land", false);
configFile.setValue("worlds." + worldName + ".grief-prevention.pvp-in-land", false);
configFile.saveConfig();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public boolean persist() {
@Override
public String onPlaceholderRequest(Player player, @NotNull String params) {

if (player == null) return langFile.getFeedbackError();

if (params.equalsIgnoreCase("pvp_status_current_world")) {
boolean pvpStatus;

Expand Down

0 comments on commit 4512276

Please sign in to comment.