Improve entity effect API
This commit is contained in:
@@ -1159,4 +1159,17 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@NotNull String getScoreboardEntryName();
|
||||
// Paper end - entity scoreboard name
|
||||
|
||||
// Paper start - broadcast hurt animation
|
||||
/**
|
||||
* Broadcasts a hurt animation. This fakes incoming damage towards the target entity.
|
||||
* <p>
|
||||
* The target players cannot include {@code this} player. For self-damage, use
|
||||
* {@link Player#sendHurtAnimation(float)}.
|
||||
*
|
||||
* @param players the players to broadcast to (cannot include {@code this}
|
||||
* @throws IllegalArgumentException if {@code this} is contained in {@code players}
|
||||
*/
|
||||
void broadcastHurtAnimation(@NotNull java.util.Collection<Player> players);
|
||||
// Paper end - broadcast hurt animation
|
||||
}
|
||||
|
||||
@@ -3899,4 +3899,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
// Paper start - entity effect API
|
||||
/**
|
||||
* Plays an entity effect to this player for the target entity
|
||||
* <p>
|
||||
* If the effect is not applicable to this class of entity, it will not play.
|
||||
*
|
||||
* @param effect the entity effect
|
||||
* @param target the target entity
|
||||
*/
|
||||
void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target);
|
||||
// Paper end - entity effect API
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user