mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-3629: Greatly expand entity effect API
By: md_5 <git@md-5.net>
This commit is contained in:
parent
f7d75ce15b
commit
8e873a6220
1 changed files with 6 additions and 1 deletions
|
@ -436,8 +436,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue