parent
2a97b2a697
commit
9b0e112a5c
@ -3,6 +3,7 @@ package com.massivecraft.mcore.integration.protocollib;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Firework;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.comphenix.protocol.Packets;
|
||||
@ -52,6 +53,10 @@ public class EntityPotionColorPacketAdapter extends PacketAdapter
|
||||
// NOTE: MetaData packets are only sent to players in the same world.
|
||||
final Entity entity = packet.getEntityModifier(sendee.getWorld()).read(0);
|
||||
|
||||
// Fireworks cannot have potion effects! They also reuse index 8
|
||||
// for sending their item stack, causing a crash if we don't bail out now.
|
||||
if (entity instanceof Firework) return;
|
||||
|
||||
// ... fetch the metadata ...
|
||||
final List<WrappedWatchableObject> metadata = packet.getWatchableCollectionModifier().read(0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user