Class ActionManager
java.lang.Object
de.themoep.resourcepacksplugin.core.PackManager
de.themoep.resourcepacksplugin.core.ActionManager
public class ActionManager
extends de.themoep.resourcepacksplugin.core.PackManager
Created by Phoenix616 on 17.06.2015.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.themoep.resourcepacksplugin.core.PackManager
de.themoep.resourcepacksplugin.core.PackManager.PackSetResult
-
Field Summary
Fields inherited from class de.themoep.resourcepacksplugin.core.PackManager
EMPTY_IDENTIFIER, HASH_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAction
(String server, ResourcePackStatus status, ActionType action, String msg) Deprecated.void
addAction
(String server, ResourcePackStatus status, PackAction action) Deprecated.void
addGlobalAction
(ResourcePackStatus status, ActionType action, String msg) Deprecated.de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status
checkPack
(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status status) getActions
(String server, ResourcePackStatus status) Deprecated.getApplicableAssignment
(String serverName) Get the assignment that corresponds to the world/server nameLinkedHashSet
<de.themoep.resourcepacksplugin.core.ResourcePack> getApplicablePacks
(UUID playerId, String serverName) int
getAppliedCount
(de.themoep.resourcepacksplugin.core.ResourcePack pack) Get the amount of online players using the specified packgetAssignment
(String name) Collection
<? extends PackActionAssignment> getGlobalActions
(ResourcePackStatus status) Deprecated.int
Get the delay before kicking a player for the kick actionvoid
init()
void
kickPlayer
(UUID playerId, String msg) Kick the player while applying a configured delayloadAssignment
(String name, Map<String, Object> config) void
onPackSelect
(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status status) void
runActions
(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status) Run actions and set the current status of a playervoid
runActions
(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status) Deprecated.void
setKickDelay
(int kickDelay) Set the delay before kicking a player for the kick actionMethods inherited from class de.themoep.resourcepacksplugin.core.PackManager
addAssignment, addPack, applyPack, applyPack, checkDirty, checkPacks, generateHashes, getApplicablePacks, getAssignmentByName, getByHash, getByHash, getByName, getByUrl, getByUuid, getEmptyPack, getPackFormat, getPacks, getPackUrl, getStoredPacksOverride, loadPack, processSendEvent, removeAssignment, removeAssignment, removePack, removeServer, setAppendHashToUrl, setDirty, setEmptyPack, setEmptyPack, setGlobalAssignment, setPack, setPack, setPack, setPackHash, setPackPath, setPackUrl, setPackUuid, setStoredPacksOverride, shouldAppendHashToUrl
-
Constructor Details
-
ActionManager
-
-
Method Details
-
init
public void init()- Overrides:
init
in classde.themoep.resourcepacksplugin.core.PackManager
-
getApplicablePacks
public LinkedHashSet<de.themoep.resourcepacksplugin.core.ResourcePack> getApplicablePacks(UUID playerId, String serverName) - Overrides:
getApplicablePacks
in classde.themoep.resourcepacksplugin.core.PackManager
-
checkPack
public de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status checkPack(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status status) - Overrides:
checkPack
in classde.themoep.resourcepacksplugin.core.PackManager
-
loadAssignment
- Overrides:
loadAssignment
in classde.themoep.resourcepacksplugin.core.PackManager
-
getApplicableAssignment
Get the assignment that corresponds to the world/server name- Parameters:
serverName
- The name- Returns:
- The assignment or the global one
-
getAssignment
- Overrides:
getAssignment
in classde.themoep.resourcepacksplugin.core.PackManager
-
getGlobalAssignment
- Overrides:
getGlobalAssignment
in classde.themoep.resourcepacksplugin.core.PackManager
-
getAssignments
- Overrides:
getAssignments
in classde.themoep.resourcepacksplugin.core.PackManager
-
runActions
@Deprecated public void runActions(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status) Deprecated.Run actions and set the current status of a player by his id- Parameters:
playerId
- The UUID of the playerpack
- The ResourcePack that was sent to the playerstatus
- The ResourcePackStatus of the player
-
runActions
public void runActions(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, de.themoep.resourcepacksplugin.core.ResourcePack pack, ResourcePackStatus status) Run actions and set the current status of a player- Parameters:
player
- The playerpack
- The ResourcePack that was sent to the playerstatus
- The ResourcePackStatus of the player
-
addAction
Deprecated.Add an action to a server to react on a specific status- Parameters:
server
- The name of the serverstatus
- The ResourcePackStatusaction
- The action to execute
-
addAction
@Deprecated public void addAction(String server, ResourcePackStatus status, ActionType action, String msg) Add an action to a server to react on a specific status with a sendMessage- Parameters:
server
- The name of the serverstatus
- The ResourcePackStatusaction
- The action to executemsg
- An additional sendMessage for the action
-
getActions
Deprecated.Get the global actions of a certain server/world and a status- Parameters:
server
- The server/world to get the action forstatus
- The ResourcePackStatus
-
addGlobalAction
Deprecated.Add a global action to react on a specific status with a message- Parameters:
status
- The ResourcePackStatusaction
- The action to executemsg
- An additional sendMessage for the action
-
getGlobalActions
Deprecated.Get the global actions of a status- Parameters:
status
- The ResourcePackStatus
-
setKickDelay
public void setKickDelay(int kickDelay) Set the delay before kicking a player for the kick action- Parameters:
kickDelay
- The delay in ticks before kicking a player
-
getKickDelay
public int getKickDelay()Get the delay before kicking a player for the kick action- Returns:
- The delay in ticks before kicking a player
-
kickPlayer
Kick the player while applying a configured delay- Parameters:
playerId
- The UUID of the player to kickmsg
- The kick message. Displayed as title and in chat when kick is delayed
-
onPackSelect
public void onPackSelect(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack, de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status status) -
getAppliedCount
public int getAppliedCount(de.themoep.resourcepacksplugin.core.ResourcePack pack) Get the amount of online players using the specified pack- Parameters:
pack
- The pack- Returns:
- THe amount of players using it
-
PackActionAssignment.addAction(ResourcePackStatus, ActionType, String)