Class ResourcePackSelectEvent
java.lang.Object
org.bukkit.event.Event
de.themoep.resourcepacksplugin.bukkit.events.ResourcePackSelectEvent
- All Implemented Interfaces:
IResourcePackSelectEvent
public class ResourcePackSelectEvent
extends org.bukkit.event.Event
implements IResourcePackSelectEvent
Created by Phoenix616 on 18.04.2015.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
Nested classes/interfaces inherited from interface de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent
IResourcePackSelectEvent.Status
-
Constructor Summary
ConstructorDescriptionResourcePackSelectEvent
(UUID playerId, List<ResourcePack> packs) ResourcePackSelectEvent
(UUID playerId, List<ResourcePack> packs, IResourcePackSelectEvent.Status status) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
getPacks()
Get the packs that were selectedThe 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 failedvoid
Set the status.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent
getPack, setPack
-
Constructor Details
-
ResourcePackSelectEvent
-
ResourcePackSelectEvent
public ResourcePackSelectEvent(UUID playerId, List<ResourcePack> packs, IResourcePackSelectEvent.Status status)
-
-
Method Details
-
getPlayerId
- Specified by:
getPlayerId
in interfaceIResourcePackSelectEvent
-
getPacks
Description copied from interface:IResourcePackSelectEvent
Get the packs that were selected- Specified by:
getPacks
in interfaceIResourcePackSelectEvent
- Returns:
- The selected packs; null if the selection failed
-
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 interfaceIResourcePackSelectEvent
- Returns:
- The status of the event
-
setStatus
Description copied from interface:IResourcePackSelectEvent
Set the status. If it isn't SUCCESS the pack will be set to null- Specified by:
setStatus
in interfaceIResourcePackSelectEvent
- Parameters:
status
- The status of the select event
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-