From dbde27d66b9939564bbeefb3d800f59b93fbdba5 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 25 Feb 2023 09:55:49 +0100 Subject: [PATCH] Add 1.19.3 support Signed-off-by: yoyosource --- .../features/tracer/record/TNTPrimedIterator19.java | 2 +- .../de/steamwar/bausystem/utils/NMSWrapper19.java | 13 +++++++------ .../bausystem/utils/PlayerMovementWrapper19.java | 3 +-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/BauSystem_19/src/de/steamwar/bausystem/features/tracer/record/TNTPrimedIterator19.java b/BauSystem_19/src/de/steamwar/bausystem/features/tracer/record/TNTPrimedIterator19.java index b56e04b3..17498269 100644 --- a/BauSystem_19/src/de/steamwar/bausystem/features/tracer/record/TNTPrimedIterator19.java +++ b/BauSystem_19/src/de/steamwar/bausystem/features/tracer/record/TNTPrimedIterator19.java @@ -21,7 +21,7 @@ package de.steamwar.bausystem.features.tracer.record; import net.minecraft.world.entity.item.EntityTNTPrimed; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_19_R1.CraftWorld; +import org.bukkit.craftbukkit.v1_19_R2.CraftWorld; import org.bukkit.entity.TNTPrimed; import java.util.stream.Stream; diff --git a/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java b/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java index f0d11ff1..24edeb9a 100644 --- a/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java +++ b/BauSystem_19/src/de/steamwar/bausystem/utils/NMSWrapper19.java @@ -35,15 +35,16 @@ import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.World; -import org.bukkit.craftbukkit.v1_19_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer; -import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftItemStack; +import org.bukkit.craftbukkit.v1_19_R2.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_19_R2.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftItemStack; import org.bukkit.entity.Player; import org.bukkit.entity.TNTPrimed; import org.bukkit.inventory.ItemStack; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.function.LongSupplier; public class NMSWrapper19 implements NMSWrapper { @@ -90,7 +91,7 @@ public class NMSWrapper19 implements NMSWrapper { if (entity instanceof TNTPrimed) { net.minecraft.world.entity.Entity serverEntity = ((CraftEntity) entity).getHandle(); - packets.add(new PacketPlayOutEntityMetadata(serverEntity.ae(), serverEntity.ai(), true)); + packets.add(new PacketPlayOutEntityMetadata(serverEntity.ah(), Objects.requireNonNull(serverEntity.al().c()))); } }); } @@ -113,8 +114,8 @@ public class NMSWrapper19 implements NMSWrapper { @Override public void setPlayerBuildAbilities(Player player) { - ((CraftPlayer) player).getHandle().fB().d = true; - ((CraftPlayer) player).getHandle().fB().e = true; + ((CraftPlayer) player).getHandle().fF().d = true; + ((CraftPlayer) player).getHandle().fF().e = true; } @Override diff --git a/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java b/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java index 4b9f7939..fd9a892e 100644 --- a/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java +++ b/BauSystem_19/src/de/steamwar/bausystem/utils/PlayerMovementWrapper19.java @@ -19,10 +19,9 @@ package de.steamwar.bausystem.utils; -import de.steamwar.bausystem.utils.PlayerMovementWrapper; import net.minecraft.network.protocol.game.PacketPlayInFlying; import net.minecraft.server.level.EntityPlayer; -import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_19_R2.entity.CraftPlayer; import org.bukkit.entity.Player; public class PlayerMovementWrapper19 implements PlayerMovementWrapper {