Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9861)

This commit is contained in:
Jake Potrebic
2023-10-26 14:56:40 -07:00
parent 5abcfb3d6b
commit 3a4d982c0f
19 changed files with 171 additions and 61 deletions

View File

@@ -108,8 +108,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
* @param name Name of the world that will be created
*/
public WorldCreator(@NotNull String name) {
- if (name == null) {
- throw new IllegalArgumentException("World name cannot be null");
- Preconditions.checkArgument(name != null, "World name cannot be null");
+ // Paper start
+ this(name, getWorldKey(name));
+ }
@@ -124,7 +123,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return NamespacedKey.minecraft("the_end");
+ } else {
+ return NamespacedKey.minecraft(name.toLowerCase(java.util.Locale.ENGLISH).replace(" ", "_"));
}
+ }
+ }
- this.name = name;