mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
SPIGOT-3629: Greatly expand entity effect API
This commit is contained in:
parent
2fae23c251
commit
c3047a5df7
@ -436,9 +436,14 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void playEffect(EntityEffect type) {
|
public void playEffect(EntityEffect type) {
|
||||||
|
Preconditions.checkArgument(type != null, "type");
|
||||||
|
|
||||||
|
if (this.getClass().isAssignableFrom(type.getApplicable())) {
|
||||||
this.getHandle().world.broadcastEntityEffect(getHandle(), type.getData());
|
this.getHandle().world.broadcastEntityEffect(getHandle(), type.getData());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setHandle(final Entity entity) {
|
public void setHandle(final Entity entity) {
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
Loading…
Reference in New Issue
Block a user