Dieser Commit ist enthalten in:
Ursprung
26140fd054
Commit
7a91aa4527
@ -30,8 +30,8 @@ import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -64,7 +64,7 @@ public class DetonatorEntity18 extends EntityFallingBlock implements AbstractDet
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
|
||||
playerConnection.a(packetPlayOutSpawnEntity);
|
||||
|
||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), Z, true);
|
||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), Y, true);
|
||||
playerConnection.a(packetPlayOutEntityMetadata);
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,8 @@ import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.entity.decoration.EntityArmorStand;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -51,7 +51,7 @@ public class BaseArmorStand18 extends EntityArmorStand implements AbstractEntity
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
|
||||
playerConnection.a(packetPlayOutSpawnEntity);
|
||||
|
||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Z, true);
|
||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Y, true);
|
||||
playerConnection.a(packetPlayOutEntityMetadata);
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,9 @@ import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -57,7 +57,7 @@ public class BaseEntity18 extends EntityFallingBlock implements AbstractEntity {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
|
||||
playerConnection.a(packetPlayOutSpawnEntity);
|
||||
|
||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Z, true);
|
||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Y, true);
|
||||
playerConnection.a(packetPlayOutEntityMetadata);
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,9 @@ import net.minecraft.server.level.PlayerInteractManager;
|
||||
import net.minecraft.world.level.EnumGamemode;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -57,7 +57,7 @@ import java.util.function.LongSupplier;
|
||||
|
||||
public class NMSWrapper18 implements NMSWrapper.INMSWrapper {
|
||||
|
||||
private static final Reflection.FieldAccessor<EnumGamemode> playerGameMode = Reflection.getField(PlayerInteractManager.class, "gamemode", EnumGamemode.class);
|
||||
private static final Reflection.FieldAccessor<EnumGamemode> playerGameMode = Reflection.getField(PlayerInteractManager.class, EnumGamemode.class, 0);
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setInternalGameMode(Player player, GameMode gameMode) {
|
||||
@ -103,8 +103,8 @@ public class NMSWrapper18 implements NMSWrapper.INMSWrapper {
|
||||
|
||||
@Override
|
||||
public void setPlayerBuildAbilities(Player player) {
|
||||
((CraftPlayer) player).getHandle().fr().d = true;
|
||||
((CraftPlayer) player).getHandle().fr().e = true;
|
||||
((CraftPlayer) player).getHandle().fs().d = true;
|
||||
((CraftPlayer) player).getHandle().fs().e = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -121,7 +121,7 @@ public class NMSWrapper18 implements NMSWrapper.INMSWrapper {
|
||||
@Override
|
||||
public boolean checkItemStack(ItemStack item) {
|
||||
net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
|
||||
NBTTagCompound tag = nmsItem.s();
|
||||
NBTTagCompound tag = nmsItem.t();
|
||||
if (tag != null && tag.e("BlockEntityTag")) {
|
||||
NBTTagCompound blockTag = tag.p("BlockEntityTag");
|
||||
if (blockTag.e("Items")) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren