Class ResourcePackSelectEvent

java.lang.Object
org.spongepowered.api.event.impl.AbstractEvent
de.themoep.resourcepacksplugin.sponge.events.ResourcePackSelectEvent
All Implemented Interfaces:
IResourcePackSelectEvent, org.spongepowered.api.event.entity.living.humanoid.player.TargetPlayerEvent, org.spongepowered.api.event.entity.living.humanoid.TargetHumanoidEvent, org.spongepowered.api.event.entity.living.TargetLivingEvent, org.spongepowered.api.event.entity.TargetEntityEvent, org.spongepowered.api.event.Event

public class ResourcePackSelectEvent extends org.spongepowered.api.event.impl.AbstractEvent implements IResourcePackSelectEvent, org.spongepowered.api.event.entity.living.humanoid.player.TargetPlayerEvent
Created by Phoenix616 on 18.04.2015.
  • Constructor Details

    • ResourcePackSelectEvent

      public ResourcePackSelectEvent(org.spongepowered.api.entity.living.player.Player player, ResourcePack pack, org.spongepowered.api.event.cause.Cause cause)
    • ResourcePackSelectEvent

      public ResourcePackSelectEvent(org.spongepowered.api.entity.living.player.Player player, ResourcePack pack, IResourcePackSelectEvent.Status status, org.spongepowered.api.event.cause.Cause cause)
  • Method Details

    • getPlayerId

      public UUID getPlayerId()
      Specified by:
      getPlayerId in interface IResourcePackSelectEvent
    • getPack

      public ResourcePack getPack()
      Description copied from interface: IResourcePackSelectEvent
      Get the pack that was selected
      Specified by:
      getPack in interface IResourcePackSelectEvent
      Returns:
      The selected pack; null if the selection failed
    • setPack

      public void setPack(ResourcePack pack)
      Description copied from interface: IResourcePackSelectEvent
      Set the pack. If it isn't null the status will be set to success. Otherwise you have to set the status yourself
      Specified by:
      setPack in interface IResourcePackSelectEvent
      Parameters:
      pack - The pack that was selected
    • getStatus

      public IResourcePackSelectEvent.Status getStatus()
      Description copied from interface: IResourcePackSelectEvent
      The status of the select event
      SUCCESS - Pack found and is not null
      NO_PERMISSION - Selection failed because the player does not have the permission for the pack
      WRONG_VERSION - Selection failed because there is not compatible pack
      NO_PERM_AND_WRONG_VERSION - Both failures happened
      UNKNOWN - We don't know why it failed
      Specified by:
      getStatus in interface IResourcePackSelectEvent
      Returns:
      The status of the event
    • setStatus

      public void setStatus(IResourcePackSelectEvent.Status status)
      Description copied from interface: IResourcePackSelectEvent
      Set the status. If it isn't SUCCESS the pack will be set to null
      Specified by:
      setStatus in interface IResourcePackSelectEvent
      Parameters:
      status - The status of the select event
    • getTargetEntity

      public org.spongepowered.api.entity.living.player.Player getTargetEntity()
      Specified by:
      getTargetEntity in interface org.spongepowered.api.event.entity.TargetEntityEvent
      Specified by:
      getTargetEntity in interface org.spongepowered.api.event.entity.living.humanoid.TargetHumanoidEvent
      Specified by:
      getTargetEntity in interface org.spongepowered.api.event.entity.living.TargetLivingEvent
      Specified by:
      getTargetEntity in interface org.spongepowered.api.event.entity.living.humanoid.player.TargetPlayerEvent
    • getCause

      public org.spongepowered.api.event.cause.Cause getCause()
      Specified by:
      getCause in interface org.spongepowered.api.event.Event