-
Method Summary
org.spongepowered.api.entity.Entity
Get the Entity
that is the source of the event.
org.spongepowered.api.item.inventory.ItemStack
Get the ItemStack
that is the target of the event.
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer>
Get the ServerPlayer
that is the source of the event.
org.spongepowered.api.event.item.inventory.UseItemStackEvent.Start
Getting the Sponge event.
May be `null` if the original event is not a Sponge event.
boolean
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.Event
cause, context, source
-
Method Details
-
getEntity
org.spongepowered.api.entity.Entity getEntity()
Get the Entity
that is the source of the event.
- Returns:
- entity
-
getPlayer
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()
Get the ServerPlayer
that is the source of the event.
- Specified by:
getPlayer
in interface RegionMessageEvent
- Returns:
- player
-
getItemStack
org.spongepowered.api.item.inventory.ItemStack getItemStack()
Get the ItemStack
that is the target of the event.
- Returns:
- item
-
isAllow
boolean isAllow()
Get protect result.
-
getSpongeEvent
org.spongepowered.api.event.item.inventory.UseItemStackEvent.Start getSpongeEvent()
Getting the Sponge event.
May be `null` if the original event is not a Sponge event.
- Specified by:
getSpongeEvent
in interface RegionWorldEvent