Class BoxCountCalculateEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.storage.BoxCountCalculateEvent
Direct Known Subclasses:
BoxCountCalculateEvent.Post, BoxCountCalculateEvent.Pre

public class BoxCountCalculateEvent extends net.minecraftforge.eventbus.api.Event
This event is fired when trying to calculate how many boxes a given target (UUID, typically player} has access to. If the box count is not overridden using the BoxCountCalculateEvent.Pre event then it will default to the value found in the storage.yml file.
No sub-events are cancellable as this information is important, and necessary.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Fired immediately after the BoxCountCalculateEvent.Pre and should be used to observe what the box count is finally decided to be
    static class 
    Event fired before the box number has been decided
    This is not cancellable as this information is always necessary

    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
    Modifier and Type
    Field
    Description
    protected int
     
    protected final UUID
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BoxCountCalculateEvent(UUID uuid, int boxCount)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    net.minecraft.server.level.ServerPlayer
     
     

    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
  • Field Details

    • uuid

      protected final UUID uuid
    • boxCount

      protected int boxCount
  • Constructor Details

    • BoxCountCalculateEvent

      protected BoxCountCalculateEvent(UUID uuid, int boxCount)
  • Method Details

    • getUuid

      public UUID getUuid()
    • getBoxCount

      public int getBoxCount()
    • getPlayer

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