Class BagItemEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent
Direct Known Subclasses:
BagItemEvent.CollectItems, BagItemEvent.SelectItem

public class BagItemEvent extends BattleEvent
This event is used for when the server is executing logic pertaining to battle items being used/collected in the bag
Since:
22/10/2022
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The event relating to when the server determines what items the server has in their inventory to then return to the client, so that they can be displayed on the screen during that turn.
    static class 
     
    static class 
    This event is fired when the client attempts to use an item from their bag, and it is subequently removed from their inventory and then given to the battle controller.

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent

    battleController
  • Constructor Summary

    Constructors
    Constructor
    Description
    BagItemEvent(BattleController battleController, String identifier, net.minecraft.server.level.ServerPlayer player)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    net.minecraft.server.level.ServerPlayer
     
    boolean
    isIdentifier(String identifier)
     
    boolean
     

    Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent

    getBattleController

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BagItemEvent

      public BagItemEvent(BattleController battleController, String identifier, net.minecraft.server.level.ServerPlayer player)
  • Method Details

    • getIdentifier

      public String getIdentifier()
    • isIdentifier

      public boolean isIdentifier(String identifier)
    • isNormalBattle

      public boolean isNormalBattle()
    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()