Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.dumptruckman.minecraft.util.Logging;
import io.vavr.control.Option;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Difficulty;
import org.bukkit.GameMode;
import org.bukkit.Material;
Expand Down Expand Up @@ -196,9 +197,15 @@
final ConfigNode<Boolean> keepSpawnInMemory = node(ConfigNode
.builder("keep-spawn-in-memory", Boolean.class)
.defaultValue(true)
.onLoadAndChange((oldValue, newValue) -> {
.onLoadAndChange((sender, oldValue, newValue) -> {
if (!(world instanceof LoadedMultiverseWorld loadedWorld)) return;
loadedWorld.getBukkitWorld().peek(bukkitWorld -> bukkitWorld.setKeepSpawnInMemory(newValue));
loadedWorld.getBukkitWorld().peek(bukkitWorld -> {
bukkitWorld.setKeepSpawnInMemory(newValue);
if (bukkitWorld.getKeepSpawnInMemory() != newValue) {
sender.sendMessage(ChatColor.RED + "Keep spawn in memory feature has been removed by " +

Check warning on line 205 in src/main/java/org/mvplugins/multiverse/core/world/WorldConfigNodes.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 '+' should be on a new line. Raw Output: /github/workspace/src/main/java/org/mvplugins/multiverse/core/world/WorldConfigNodes.java:205:112: warning: '+' should be on a new line. (com.puppycrawl.tools.checkstyle.checks.whitespace.OperatorWrapCheck)
"Minecraft in 1.21.9+ and will no longer have any effect when set to true.");
}
});
}));

final ConfigNode<Integer> playerLimit = node(ConfigNode.builder("player-limit", Integer.class)
Expand Down
Loading