mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
WorldCreator#keepSpawnLoaded (#7673)
This commit is contained in:
48
patches/api/WorldCreator-keepSpawnLoaded.patch
Normal file
48
patches/api/WorldCreator-keepSpawnLoaded.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 3 Jul 2021 21:18:41 +0100
|
||||
Subject: [PATCH] WorldCreator#keepSpawnLoaded
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/WorldCreator.java
|
||||
+++ b/src/main/java/org/bukkit/WorldCreator.java
|
||||
@@ -0,0 +0,0 @@ public class WorldCreator {
|
||||
private boolean generateStructures = true;
|
||||
private String generatorSettings = "";
|
||||
private boolean hardcore = false;
|
||||
+ private net.kyori.adventure.util.TriState keepSpawnLoaded = net.kyori.adventure.util.TriState.NOT_SET; // Paper
|
||||
|
||||
/**
|
||||
* Creates an empty WorldCreationOptions for the given world name
|
||||
@@ -0,0 +0,0 @@ public class WorldCreator {
|
||||
|
||||
return result;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the current intent to keep the world loaded, @see {@link WorldCreator#keepSpawnLoaded(net.kyori.adventure.util.TriState)}
|
||||
+ *
|
||||
+ * @return the current tristate value
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public net.kyori.adventure.util.TriState keepSpawnLoaded() {
|
||||
+ return keepSpawnLoaded;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Controls if a world should be kept loaded or not, default (NOT_SET) will use the servers standard
|
||||
+ * configuration, otherwise, will act as an override towards this setting
|
||||
+ *
|
||||
+ * @param keepSpawnLoaded the new value
|
||||
+ */
|
||||
+ public void keepSpawnLoaded(@NotNull net.kyori.adventure.util.TriState keepSpawnLoaded) {
|
||||
+ java.util.Objects.requireNonNull(keepSpawnLoaded, "keepSpawnLoaded");
|
||||
+ this.keepSpawnLoaded = keepSpawnLoaded;
|
||||
+ }
|
||||
+
|
||||
+ // Paper end
|
||||
}
|
Reference in New Issue
Block a user