mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 02:10:30 +01:00
dcebe229b5
--- work/Bukkit Submodule work/Bukkit 1627782b..67e91ef7: > Fix some incorrectly handled JavaDoc > SPIGOT-4478: Update PlayerLoginEvent docs > Add API to manipulate boss bar of entities and those created by commands --- work/CraftBukkit Submodule work/CraftBukkit ca22de36..3a911828: > SPIGOT-4477: Arrows only firing direction of boat > SPIGOT-4478: NPE during PlayerLoginEvent recipe manipulation > Add API to manipulate boss bar of entities and those created by commands --- work/Spigot Submodule work/Spigot 2474d93d..947a8e7f: > Rebuild patches
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
From eb0e5f5cfd2a13ad8b14c6571b16dabfd5649848 Mon Sep 17 00:00:00 2001
|
|
From: Brokkonaut <hannos17@gmx.de>
|
|
Date: Tue, 25 Sep 2018 06:53:43 +0200
|
|
Subject: [PATCH] Avoid dimension id collisions
|
|
|
|
getDimensionId() returns the dimension id - 1. So without this patch
|
|
we would reuse an existing dimension id, if some other dimension was
|
|
unloaded before.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index ef09846e8..c56511abc 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -971,7 +971,7 @@ public final class CraftServer implements Server {
|
|
boolean used = false;
|
|
do {
|
|
for (WorldServer server : console.getWorlds()) {
|
|
- used = server.dimension.getDimensionID() == dimension;
|
|
+ used = server.dimension.getDimensionID() + 1 == dimension; // Paper - getDimensionID returns the dimension - 1, so we have to add 1
|
|
if (used) {
|
|
dimension++;
|
|
break;
|
|
--
|
|
2.19.1
|
|
|