mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-10 17:42:16 +01:00
Compensate for allow-nether/allow-end as false; Fixes BUKKIT-3466
When either of those settings are false, the worlds are not loaded and therefore will not be targeted for portal exits. Existing worlds are iterated directly to avoid defaulting to the first world if a direct dimension match is not found. Plugins must also specify exit from custom Bukkit worlds to comply with original commit: https://github.com/Bukkit/CraftBukkit/commit/2dc2af0 This commit introduces a constant to clarify the dependency on the CraftBukkit implementation of custom worlds having a dimension offset. By: EdGruberman <ed@rjump.com>
This commit is contained in:
parent
2cf54ae100
commit
78e16bd8de
@ -694,7 +694,7 @@ public final class CraftServer implements Server {
|
||||
converter.convert(name, new ConvertProgressUpdater(console));
|
||||
}
|
||||
|
||||
int dimension = 10 + console.worlds.size();
|
||||
int dimension = CraftWorld.CUSTOM_DIMENSION_OFFSET + console.worlds.size();
|
||||
boolean used = false;
|
||||
do {
|
||||
for (WorldServer server : console.worlds) {
|
||||
|
@ -49,6 +49,8 @@ import org.bukkit.plugin.messaging.StandardMessenger;
|
||||
import org.bukkit.craftbukkit.util.LongHash;
|
||||
|
||||
public class CraftWorld implements World {
|
||||
public static final int CUSTOM_DIMENSION_OFFSET = 10;
|
||||
|
||||
private final WorldServer world;
|
||||
private Environment environment;
|
||||
private final CraftServer server = (CraftServer) Bukkit.getServer();
|
||||
|
Loading…
Reference in New Issue
Block a user