geforkt von Mirrors/Paper
SPIGOT-4199: Riptide related APIs
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
da7f9c03f6
Commit
65dd6c17e9
@ -341,6 +341,15 @@ public interface LivingEntity extends Attributable, Entity, Damageable, Projecti
|
||||
*/
|
||||
public void setSwimming(boolean swimming);
|
||||
|
||||
/**
|
||||
* Checks to see if an entity is currently using the Riptide enchantment.
|
||||
*
|
||||
* @return True if this entity is currently riptiding.
|
||||
* @deprecated draft API
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isRiptiding();
|
||||
|
||||
/**
|
||||
* Sets whether an entity will have AI.
|
||||
*
|
||||
|
@ -0,0 +1,46 @@
|
||||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.Warning;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* This event is fired when the player activates the riptide enchantment, using
|
||||
* their trident to propel them through the air.
|
||||
* <br>
|
||||
* N.B. the riptide action is currently performed client side, so manipulating
|
||||
* the player in this event may have undesired effects
|
||||
*
|
||||
* @deprecated draft API
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(false)
|
||||
public class PlayerRiptideEvent extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final ItemStack item;
|
||||
|
||||
public PlayerRiptideEvent(final Player who, final ItemStack item) {
|
||||
super(who);
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the item containing the used enchantment.
|
||||
*
|
||||
* @return held enchanted item
|
||||
*/
|
||||
public ItemStack getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren