Class BukkitPartiesPartyPreExperienceDropEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- com.alessiodp.parties.api.events.bukkit.BukkitPartiesEvent
-
- com.alessiodp.parties.api.events.bukkit.party.BukkitPartiesPartyPreExperienceDropEvent
-
- All Implemented Interfaces:
Cancellable,IPartyPreExperienceDropEvent,PartiesEvent
- Direct Known Subclasses:
BukkitPartiesPreExperienceDropEvent
public class BukkitPartiesPartyPreExperienceDropEvent extends BukkitPartiesEvent implements IPartyPreExperienceDropEvent
-
-
Constructor Summary
Constructors Constructor Description BukkitPartiesPartyPreExperienceDropEvent(Party party, PartyPlayer player, Object killedEntity, double experience)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetExperience()Get the dropped experience@Nullable ObjectgetKilledEntity()Get the killed entity, null if doesn't exist.@NotNull PartygetParty()Get the party@Nullable PartyPlayergetPlayer()Get the player who killed the entity, null if there isn't anybooleanisCancelled()Is the event cancelled?voidsetCancelled(boolean cancel)Set the event as cancelledvoidsetExperience(double experience)Set the dropped experience-
Methods inherited from class com.alessiodp.parties.api.events.bukkit.BukkitPartiesEvent
getApi, getHandlerList, getHandlers, setApi
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.alessiodp.parties.api.events.PartiesEvent
getApi, setApi
-
-
-
-
Constructor Detail
-
BukkitPartiesPartyPreExperienceDropEvent
public BukkitPartiesPartyPreExperienceDropEvent(Party party, PartyPlayer player, Object killedEntity, double experience)
-
-
Method Detail
-
getParty
@NotNull public @NotNull Party getParty()
Description copied from interface:IPartyPreExperienceDropEventGet the party- Specified by:
getPartyin interfaceIPartyPreExperienceDropEvent- Returns:
- the
Party
-
getPlayer
@Nullable public @Nullable PartyPlayer getPlayer()
Description copied from interface:IPartyPreExperienceDropEventGet the player who killed the entity, null if there isn't any- Specified by:
getPlayerin interfaceIPartyPreExperienceDropEvent- Returns:
- the
PartyPlayer
-
getKilledEntity
@Nullable public @Nullable Object getKilledEntity()
Description copied from interface:IPartyPreExperienceDropEventGet the killed entity, null if doesn't exist. Only Bukkit handles killed entities. The object, if not null, its an instance of Bukkit Entity.- Specified by:
getKilledEntityin interfaceIPartyPreExperienceDropEvent- Returns:
- the killed entity, intance of Bukkit Entity
-
getExperience
public double getExperience()
Description copied from interface:IPartyPreExperienceDropEventGet the dropped experience- Specified by:
getExperiencein interfaceIPartyPreExperienceDropEvent- Returns:
- the number of experience dropped
-
setExperience
public void setExperience(double experience)
Description copied from interface:IPartyPreExperienceDropEventSet the dropped experience- Specified by:
setExperiencein interfaceIPartyPreExperienceDropEvent- Parameters:
experience- the number of experience dropped
-
isCancelled
public boolean isCancelled()
Description copied from interface:CancellableIs the event cancelled?- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif the event is cancelled
-
setCancelled
public void setCancelled(boolean cancel)
Description copied from interface:CancellableSet the event as cancelled- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel-trueto cancel
-
-