use of org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.ints.IntArrayList in project MessageOverHead by TheDiVaZo.
the class Bubble method remove.
public void remove() {
if (isRemovedBubble)
return;
PacketContainer removeStandPacket = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
if (Main.getVersion() >= 1.18f) {
List<Integer> Entity = new ArrayList<>();
Entity.add(id);
removeStandPacket.getIntLists().write(0, Entity);
} else if (Main.getVersion() == 1.17f) {
removeStandPacket.getModifier().write(0, new IntArrayList(new int[] { id }));
} else {
removeStandPacket.getModifier().write(0, new int[] { id });
}
pm.broadcastServerPacket(removeStandPacket);
}
use of org.bukkit.craftbukkit.libs.it.unimi.dsi.fastutil.ints.IntArrayList in project HMCCosmetics by HibiscusMC.
the class PacketHelper_1_17_R1 method getDestroyPacket.
@Override
public PacketContainer getDestroyPacket(final int entityId) {
final PacketContainer destroyPacket = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
destroyPacket.getModifier().write(0, new IntArrayList(new int[] { entityId }));
return destroyPacket;
}
Aggregations