some compilation fixes

This commit is contained in:
granny
2025-09-21 23:23:45 -07:00
parent 585e6ca366
commit ac0cb5d821
6 changed files with 16 additions and 12 deletions

View File

@@ -29,10 +29,10 @@ index ae850c7366e438e5721f0914b48a1e36408e8917..e5d23a8d571fda492bc6dd6ee6694f17
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 33908430c27e8590b6509a1dea456b44ebb665c1..0d93eb5c28570c0d82846f3dfaeac28e94cb420c 100644
index d352b1130c287007ea12392cc613e6bb0449d14b..4eb7d90f38e744b51c11d334a44dacb0a9ac6956 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1424,6 +1424,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
@@ -1426,6 +1426,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
// Paper start - Teleport passenger API
// Don't allow teleporting between worlds while keeping passengers
if (ignorePassengers && entity.isVehicle() && location.getWorld() != this.getWorld()) {
@@ -40,7 +40,7 @@ index 33908430c27e8590b6509a1dea456b44ebb665c1..0d93eb5c28570c0d82846f3dfaeac28e
return false;
}
@@ -1445,6 +1446,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
@@ -1447,6 +1448,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
}
if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1954,6 +_,50 @@
@@ -1954,6 +_,52 @@
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
}
@@ -28,7 +28,8 @@
+
+ @Override
+ public void sendBlockHighlight(Location location, int duration, String text, int argb) {
+ net.minecraft.network.protocol.game.DebugPackets.sendGameTestAddMarker(getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toBlockPosition(location), text, argb, duration);
+ // Purpur - TODO: fix block highlight API
+ //net.minecraft.network.protocol.game.DebugPackets.sendGameTestAddMarker(getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toBlockPosition(location), text, argb, duration);
+ }
+
+ @Override
@@ -44,7 +45,8 @@
+
+ @Override
+ public void clearBlockHighlights() {
+ net.minecraft.network.protocol.game.DebugPackets.sendGameTestClearPacket(getHandle());
+ // Purpur - TODO: fix block highlight API
+ //net.minecraft.network.protocol.game.DebugPackets.sendGameTestClearPacket(getHandle());
+ }
+ // Purpur end - Debug Marker API
+

View File

@@ -17,7 +17,7 @@
if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined
for (ServerPlayer player : this.server.getHandle().players) {
if (player.getBukkitEntity().canSee(this)) {
@@ -978,6 +_,78 @@
@@ -978,6 +_,80 @@
}
}
@@ -64,7 +64,8 @@
+ @Override
+ public void sendBlockHighlight(Location location, int duration, String text, int argb) {
+ if (this.getHandle().connection == null) return;
+ this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestAddMarkerDebugPayload(org.bukkit.craftbukkit.util.CraftLocation.toBlockPosition(location), argb, text, duration)));
+ // Purpur - TODO: fix block highlight API
+ //this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestAddMarkerDebugPayload(org.bukkit.craftbukkit.util.CraftLocation.toBlockPosition(location), argb, text, duration)));
+ }
+
+ @Override
@@ -81,7 +82,8 @@
+ @Override
+ public void clearBlockHighlights() {
+ if (this.getHandle().connection == null) return;
+ this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload()));
+ // Purpur - TODO: fix block highlight API
+ //this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload()));
+ }
+ // Purpur end - Debug Marker API
+