3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

SPIGOT-3629: Greatly expand entity effect API

Dieser Commit ist enthalten in:
md_5 2017-11-07 19:32:24 +11:00
Ursprung 2fae23c251
Commit c3047a5df7

Datei anzeigen

@ -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) {