Class PlayerResourcePackStatusEvent


public class PlayerResourcePackStatusEvent extends Object
This event is fired when the status of a resource pack sent to the player by the server is changed. Depending on the result of this event (which Velocity will wait until completely fired), the player may be kicked from the server.
  • Constructor Details

  • Method Details

    • getPlayer

      public Player getPlayer()
      Returns the player affected by the change in resource pack status.
      the player
    • getStatus

      Returns the new status for the resource pack.
      the new status
    • getPackInfo

      public @Nullable ResourcePackInfo getPackInfo()
      Returns the ResourcePackInfo this response is for.
      the resource-pack info or null if no request was recorded
    • isOverwriteKick

      public boolean isOverwriteKick()
      Gets whether or not to override the kick resulting from ResourcePackInfo.getShouldForce() being true.
      whether or not to overwrite the result
    • setOverwriteKick

      public void setOverwriteKick(boolean overwriteKick)
      Set to true to prevent ResourcePackInfo.getShouldForce() from kicking the player. Overwriting this kick is only possible on versions older than 1.17, as the client or server will enforce this regardless. Cancelling the resulting kick-events will not prevent the player from disconnecting from the proxy.
      overwriteKick - whether or not to cancel the kick
      IllegalArgumentException - if the player version is 1.17 or newer
    • toString

      public String toString()
      toString in class Object