Class PlayerNpcPickupEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.PlayerNpcEvent
net.risingworld.api.events.player.PlayerNpcPickupEvent
- All Implemented Interfaces:
Cancellable
Called when a player tries to pick up an npc (typically a small or baby animal).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the npc item representation, i.e the npc item that will be added to the player inventory.boolean/////////////////////////////////////////////////////////////////////////voidsetCancelled(boolean cancel) Cancels this event.Methods inherited from class PlayerNpcEvent
getNpcMethods inherited from class PlayerEvent
getPlayer
-
Method Details
-
getNpcItem
Gets the npc item representation, i.e the npc item that will be added to the player inventory. Might be null.- Returns:
- the npc item, or null if the player does not get an item on pickup.
-
isCancelled
public boolean isCancelled()/////////////////////////////////////////////////////////////////////////- Specified by:
isCancelledin interfaceCancellable- Returns:
- true if the event is cancelled, or false if not.
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableCancels this event. This means it will no longer be executed, but other plugins will still receive the event.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel- set to true if you want to cancel this event.- Example: Cancel "PlayerEnterAreaEvent", i.e prevent player from entering an area
-