Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup player profile getters and constructor to expected nullability #9770

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
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
42 changes: 24 additions & 18 deletions patches/server/0141-Basic-PlayerProfile-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/

diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
new file mode 100644
index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f1bda658e
index 0000000000000000000000000000000000000000..b7da8606e24b216b39020130fd2c42c7cd387a3a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
@@ -0,0 +1,401 @@
@@ -0,0 +1,402 @@
+package com.destroystokyo.paper.profile;
+
+import com.mojang.authlib.yggdrasil.ProfileResult;
Expand Down Expand Up @@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f
+ }
+
+ public CraftPlayerProfile(UUID id, String name) {
+ this.profile = new GameProfile(id, name);
+ this.profile = new GameProfile(id != null ? id : Util.NIL_UUID, name != null ? name : "");
+ }
+
+ public CraftPlayerProfile(GameProfile profile) {
Expand Down Expand Up @@ -103,16 +103,17 @@ index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f
+ @Nullable
+ @Override
+ public UUID getId() {
+ return profile.getId();
+ return profile.getId().equals(Util.NIL_UUID) ? null : profile.getId();
+ }
+
+ @Override
+ @Deprecated(forRemoval = true)
+ public UUID setId(@Nullable UUID uuid) {
+ GameProfile prev = this.profile;
+ this.profile = new GameProfile(uuid, prev.getName());
+ copyProfileProperties(prev, this.profile);
+ return prev.getId();
+ final GameProfile previousProfile = this.profile;
+ final UUID previousId = this.getId();
+ this.profile = new GameProfile(previousProfile.getId(), previousProfile.getName());
+ copyProfileProperties(previousProfile, this.profile);
+ return previousId;
+ }
+
+ @Override
Expand All @@ -130,7 +131,7 @@ index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f
+ @Deprecated(forRemoval = true)
+ public String setName(@Nullable String name) {
+ GameProfile prev = this.profile;
+ this.profile = new GameProfile(prev.getId(), name);
+ this.profile = new GameProfile(prev.getId(), name != null ? name : "");
+ copyProfileProperties(prev, this.profile);
+ return prev.getName();
+ }
Expand Down Expand Up @@ -213,7 +214,7 @@ index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f
+ MinecraftServer server = MinecraftServer.getServer();
+ String name = profile.getName();
+ GameProfileCache userCache = server.getProfileCache();
+ if (profile.getId() == null) {
+ if (this.getId() == null) {
+ final GameProfile profile;
+ if (onlineMode) {
+ profile = lookupUUID ? userCache.get(name).orElse(null) : userCache.getProfileIfCached(name);
Expand All @@ -228,11 +229,11 @@ index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f
+ }
+ }
+
+ if ((profile.getName() == null || !hasTextures()) && profile.getId() != null) {
+ if ((profile.getName().isEmpty() || !hasTextures()) && this.getId() != null) {
+ Optional<GameProfile> optProfile = userCache.get(this.profile.getId());
+ if (optProfile.isPresent()) {
+ GameProfile profile = optProfile.get();
+ if (this.profile.getName() == null) {
+ if (this.profile.getName().isEmpty()) {
+ // if old has it, assume its newer, so overwrite, else use cached if it was set and ours wasn't
+ copyProfileProperties(this.profile, profile);
+ this.profile = profile;
Expand Down Expand Up @@ -314,7 +315,7 @@ index 0000000000000000000000000000000000000000..e513ce5bcb5070b8a57737228904381f
+ if (this.getId() != null) {
+ map.put("uniqueId", this.getId().toString());
+ }
+ if (this.getName() != null) {
+ if (!this.getName().isEmpty()) {
+ map.put("name", getName());
+ }
+ if (!this.properties.isEmpty()) {
Expand Down Expand Up @@ -614,7 +615,7 @@ index c70cd016e1978931d115cfca94664897f0158196..eac9658fa4cab7a651e10e4e18c679e0
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0ef8750c7c862a44dfb0e15602ef819790c9f1a4..cfb0846381f5ebfe33fc4074f21fb0993812f75c 100644
index 0ef8750c7c862a44dfb0e15602ef819790c9f1a4..a230e2ac2de48d4d5d963e1de2bd87999b4ad2fc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -263,6 +263,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
Expand All @@ -635,7 +636,7 @@ index 0ef8750c7c862a44dfb0e15602ef819790c9f1a4..cfb0846381f5ebfe33fc4074f21fb099
CraftItemFactory.instance();
}

@@ -2681,5 +2685,37 @@ public final class CraftServer implements Server {
@@ -2681,5 +2685,42 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}
Expand All @@ -661,14 +662,19 @@ index 0ef8750c7c862a44dfb0e15602ef819790c9f1a4..cfb0846381f5ebfe33fc4074f21fb099
+ @Override
+ public com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) {
+ Player player = uuid != null ? Bukkit.getPlayer(uuid) : (name != null ? Bukkit.getPlayerExact(name) : null);
+ if (player == null) return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name);
+ if (player == null) {
+ return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name);
+ }
+
+ if (java.util.Objects.equals(uuid, player.getUniqueId()) && java.util.Objects.equals(name, player.getName())) {
+ return new com.destroystokyo.paper.profile.CraftPlayerProfile((CraftPlayer) player);
+ }
+
+ final com.mojang.authlib.GameProfile profile = new com.mojang.authlib.GameProfile(uuid, name);
+ profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties());
+ final com.mojang.authlib.GameProfile profile = new com.mojang.authlib.GameProfile(
+ uuid != null ? uuid : net.minecraft.Util.NIL_UUID,
+ name != null ? name : ""
+ );
+ profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
+ return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
+ }
// Paper end
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0167-AsyncTabCompleteEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ index 1b856ecd7926e90a62045176f75d7ae6f0ac69d5..4ba7ed0a4ff52caa21632f69ab087564

@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cfb0846381f5ebfe33fc4074f21fb0993812f75c..1eb5f95848a25a0a002a3ec9e8edf03be63b140a 100644
index a230e2ac2de48d4d5d963e1de2bd87999b4ad2fc..eb56b65b5f10fe00c3d44153e7c3bd6e6eef1071 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2131,7 +2131,7 @@ public final class CraftServer implements Server {
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0183-getPlayerUniqueId-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1eb5f95848a25a0a002a3ec9e8edf03be63b140a..b0f76a563d640360b73cb1779eae74fbf552f54e 100644
index eb56b65b5f10fe00c3d44153e7c3bd6e6eef1071..14a56b1153e87630065a58a6477573bef1597d12 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1729,6 +1729,25 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ index 5a3f0a6e3f663718993cf3679ffc96c4af140e4d..cdc020e1787c258ba283d86a25ab1532
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b0f76a563d640360b73cb1779eae74fbf552f54e..c5a59f5f94ded049d39b1e1ffac1a71f4c5b9535 100644
index 14a56b1153e87630065a58a6477573bef1597d12..37ce30dea4c46eeb301b986de5920c16d46990a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -917,6 +917,7 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de766
}

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c5a59f5f94ded049d39b1e1ffac1a71f4c5b9535..5fe9750472edaa5684ded6beb6acce3156bbc2b2 100644
index 37ce30dea4c46eeb301b986de5920c16d46990a1..4758931f21a477b328ee463369338e22b22d4e1b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2707,6 +2707,16 @@ public final class CraftServer implements Server {
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0315-Expose-the-internal-current-tick.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Subject: [PATCH] Expose the internal current tick


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5fe9750472edaa5684ded6beb6acce3156bbc2b2..fc1dcd6aae389d89ab2c0233448ea64b50c065a9 100644
index 4758931f21a477b328ee463369338e22b22d4e1b..dd4d1b6f59992c8bf0336b146cc163c6a612999d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2748,5 +2748,10 @@ public final class CraftServer implements Server {
profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties());
@@ -2753,5 +2753,10 @@ public final class CraftServer implements Server {
profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
}
+
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0342-Anti-Xray.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ index d10dcf5b9c987bbd4761470c16c9d4693ccf896d..adee86c79f9db0a93691ec338791d7c7

public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fc1dcd6aae389d89ab2c0233448ea64b50c065a9..5b097b8cef1a2b71e83be6f23abf088af20195ba 100644
index dd4d1b6f59992c8bf0336b146cc163c6a612999d..be805e78fb4cb9fba25afd53af8d72ff4a1e1526 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2277,7 +2277,7 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ index 4d3cd4a5dbf7adb482e60dc88ededdaccf558061..951e283d38cb7601049ac6f24385acde
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5b097b8cef1a2b71e83be6f23abf088af20195ba..6c213d609972ac2fd9052057c07add57596d41b0 100644
index be805e78fb4cb9fba25afd53af8d72ff4a1e1526..89d7ae645a0a34a260aa84464661b2ba47b9bc51 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2532,6 +2532,16 @@ public final class CraftServer implements Server {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0359-Expose-MinecraftServer-isRunning.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6c213d609972ac2fd9052057c07add57596d41b0..9a63b95ee80da386c1055976ffed8e032b67c903 100644
index 89d7ae645a0a34a260aa84464661b2ba47b9bc51..ba381026071767428273b35cc57b4181c57c43f1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2763,5 +2763,10 @@ public final class CraftServer implements Server {
@@ -2768,5 +2768,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick;
}
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0386-Expose-game-version.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9a63b95ee80da386c1055976ffed8e032b67c903..c4c0e55920f0e833f5a8c77ce199cbb271dd3313 100644
index ba381026071767428273b35cc57b4181c57c43f1..4ebe72172b01dd48651ac6bf21026a77268fa6dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -584,6 +584,13 @@ public final class CraftServer implements Server {
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0389-misc-debugging-dumps.patch
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ index ed80d9551cd7cc1ec26a5d5fd7bc185b38fddd78..77e19f345bf68d12686a65e669cd597c
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c4c0e55920f0e833f5a8c77ce199cbb271dd3313..633cd70f8390c4aa9a9b52054f8b58106ae079e6 100644
index 4ebe72172b01dd48651ac6bf21026a77268fa6dc..98fec62469f19680cb849cffb6c00b603c34fb65 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1008,6 +1008,7 @@ public final class CraftServer implements Server {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0392-Implement-Mob-Goal-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
LOOK,
JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 633cd70f8390c4aa9a9b52054f8b58106ae079e6..83ff2373ba5ec4b862170e0c1ff2d84deb7df5eb 100644
index 98fec62469f19680cb849cffb6c00b603c34fb65..70dfd93212fb0cb2c1e5e70e0d46e913be6a85e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2776,5 +2776,11 @@ public final class CraftServer implements Server {
@@ -2781,5 +2781,11 @@ public final class CraftServer implements Server {
public boolean isStopping() {
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ index a107751a13ccef2729068e9b9822509374d20187..e2b4e7fb68aeaa2a95f3d1dfdd045217
// CraftBukkit end
this.getConnection().stop();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 83ff2373ba5ec4b862170e0c1ff2d84deb7df5eb..ab4dc88090107b713051eb31d7dd425dd96cdc8e 100644
index 70dfd93212fb0cb2c1e5e70e0d46e913be6a85e4..b35b3feafbd25d698d3fea463d4bf65b6a09b590 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1018,6 +1018,31 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ index b664a4ae7b10ce3ea83186a6112c0db0cbd6112a..c3844274b185decd92d021e7c7343adb
}

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ab4dc88090107b713051eb31d7dd425dd96cdc8e..500f903b6ef6fa352b51696bd5be0a650ae6d2f1 100644
index b35b3feafbd25d698d3fea463d4bf65b6a09b590..7494c8762f7ea9828a7dfc71dc2965838bbd8a0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -957,8 +957,8 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 500f903b6ef6fa352b51696bd5be0a650ae6d2f1..c0871d8a7ab38a881a03c5d1f18d8d8ca9e5b993 100644
index 7494c8762f7ea9828a7dfc71dc2965838bbd8a0f..e58a2a3532d6ba62e99708b0f4f2cc8f3b6b97bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -384,7 +384,7 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c0871d8a7ab38a881a03c5d1f18d8d8ca9e5b993..bf8c4dc4b9b9945087a0ab49e039a9808a39c696 100644
index e58a2a3532d6ba62e99708b0f4f2cc8f3b6b97bc..877ce4baa6a0e755d81bdc3df57fcc9a0a90f1a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1813,6 +1813,28 @@ public final class CraftServer implements Server {
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0564-Expand-world-key-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ index 93f44ca0c8388935baaa41f9b0ebb6de2f6906bb..53b62be779bbb31723c4953221d8b5f2
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bf8c4dc4b9b9945087a0ab49e039a9808a39c696..378be7b791a2d600c094ae39b1fb091fc6124557 100644
index 877ce4baa6a0e755d81bdc3df57fcc9a0a90f1a5..48ba01082041281d247b898cfa84bccf21ce9b15 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1139,9 +1139,15 @@ public final class CraftServer implements Server {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0597-Add-basic-Datapack-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 378be7b791a2d600c094ae39b1fb091fc6124557..44011ea91590e26fb39ee149eac06811ea47eb02 100644
index 48ba01082041281d247b898cfa84bccf21ce9b15..87374f4f81affc7ae72d7178f4c414026518a5f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -303,6 +303,7 @@ public final class CraftServer implements Server {
Expand All @@ -111,7 +111,7 @@ index 378be7b791a2d600c094ae39b1fb091fc6124557..44011ea91590e26fb39ee149eac06811
}

public boolean getCommandBlockOverride(String command) {
@@ -2844,5 +2846,11 @@ public final class CraftServer implements Server {
@@ -2849,5 +2851,11 @@ public final class CraftServer implements Server {
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
return mobGoals;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ index b850dba2b0fa5bc762b170ed7083cf8904761f17..7dee0f7d49f3492c92fceff7750e6962
return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 44011ea91590e26fb39ee149eac06811ea47eb02..a5b77644dc64e646de0d542dfd7b7f68df823eb1 100644
index 87374f4f81affc7ae72d7178f4c414026518a5f6..ab1c96a6d7e0d3f8bb651936256e9a66badf3355 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1216,9 +1216,7 @@ public final class CraftServer implements Server {
Expand Down
Loading
Loading