mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-28 10:53:51 -07:00
SPIGOT-3629: Greatly expand entity effect API
This commit is contained in:
@@ -436,8 +436,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void playEffect(EntityEffect type) {
|
public void playEffect(EntityEffect type) {
|
||||||
this.getHandle().world.broadcastEntityEffect(getHandle(), type.getData());
|
Preconditions.checkArgument(type != null, "type");
|
||||||
|
|
||||||
|
if (this.getClass().isAssignableFrom(type.getApplicable())) {
|
||||||
|
this.getHandle().world.broadcastEntityEffect(getHandle(), type.getData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHandle(final Entity entity) {
|
public void setHandle(final Entity entity) {
|
||||||
|
Reference in New Issue
Block a user