Package sawfowl.commandpack.api
Interface TempPlayerData
public interface TempPlayerData
Used to store temporary data of players who used the functionality of the CommandPack plugin.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommandTracking
(String command, ServerPlayer player) Adding command usage tracking.
Only CommandPack plugin API commands are accepted.void
addReply
(ServerPlayer player, Audience audience) Adding Audience for the /reply commandvoid
addTrackingCooldownCommand
(String command) Register the tracking of delays between command executions.void
addTrackingCooldownCommand
(PluginCommand command) Register the tracking of delays between command executions.long
getLastActivity
(ServerPlayer player) Getting the time of the last activity of the player.getPlayerMods
(ServerPlayer player) Deprecated.getPreviousLocation
(ServerPlayer player) Getting the player's location before teleportation.getReply
(ServerPlayer player) Getting Audience for the /reply commandgetTrackingMap
(String command) A map of players who cannot currently reuse a command.getTrackingMap
(PluginCommand command) A map of players who cannot currently reuse a command.Getting a tracking map of waiting execute player commands.
Changing this map has no effect on the tracking.Getting a tracking map of waiting execute player commands.
Changing this map has no effect on the tracking.getVanishEnabledTime
(ServerPlayer player) The invisibility activation time with the `/vanish` command.boolean
isAfk
(ServerPlayer player) Checks the status of the player's current activity.boolean
isDisableTpRequests
(ServerPlayer player) Whether the player accepts teleportation requests.boolean
isSpyCommand
(ServerPlayer player) Whether the player listens to other players' commands.boolean
isTrackingPlayer
(UUID uuid) Tracking check.boolean
isTrackingPlayer
(ServerPlayer player) Tracking check.boolean
isVanished
(ServerPlayer player) If true, the player is invisible and will be shown as offline in the `/seen` command.
In this case, the time of the last activity will be equal to the activation time of invisibility.void
registerCommandTracking
(PluginCommand command) Registering to track a command.void
removeCommandTracking
(String command, UUID uuid) Removing command usage tracking.
Only CommandPack plugin commands are accepted.
If you remove the tracking of a command to be executed by the player when the timer expires, it will not be executed.void
removeCommandTracking
(String command, ServerPlayer player) Removing command usage tracking.
Only CommandPack plugin commands are accepted.
If you remove the tracking of a command to be executed by the player when the timer expires, it will not be executed.void
removeReply
(ServerPlayer player) Removing Audience for the /reply commandvoid
removeVanishEnabledTime
(ServerPlayer player) Removing the invisibility activation time.void
setAfkStatus
(ServerPlayer player) Assigning AFK status to a player.void
setPreviousLocation
(ServerPlayer player) Set the location of the player's previous location.void
setVanishTime
(ServerPlayer player) Specify the current time as the activation time of invisibility in the player.void
switchSpyCommand
(ServerPlayer player) Switching the player's status of listening to the commands of other players.
A player will not be added if he does not have permission to listen to commands.void
tpToggle
(ServerPlayer player) Change the status of receiving teleportation requests.void
updateLastActivity
(ServerPlayer player) Updating the time of the player's last activity
-
Method Details
-
registerCommandTracking
Registering to track a command. -
addCommandTracking
Adding command usage tracking.
Only CommandPack plugin API commands are accepted.- Parameters:
command
- - Settings or alias.player
- - The player.
-
isTrackingPlayer
Tracking check.- Parameters:
player
- - The player.- Returns:
- If true, then the plugin monitors the execution of any command by the player.
-
isTrackingPlayer
Tracking check.- Parameters:
uuid
- - The player uuidUUID
- Returns:
- If true, then the plugin monitors the execution of any command by the player.
-
removeCommandTracking
Removing command usage tracking.
Only CommandPack plugin commands are accepted.
If you remove the tracking of a command to be executed by the player when the timer expires, it will not be executed.- Parameters:
command
- - PluginCommand or alias.player
- - The player.
-
removeCommandTracking
Removing command usage tracking.
Only CommandPack plugin commands are accepted.
If you remove the tracking of a command to be executed by the player when the timer expires, it will not be executed.- Parameters:
command
- - PluginCommand or alias.uuid
- - The player uuid.
-
getTrackingPlayerCommands
Getting a tracking map of waiting execute player commands.
Changing this map has no effect on the tracking. -
getTrackingPlayerCommands
Getting a tracking map of waiting execute player commands.
Changing this map has no effect on the tracking. -
tpToggle
Change the status of receiving teleportation requests. -
isDisableTpRequests
Whether the player accepts teleportation requests. -
getPreviousLocation
Getting the player's location before teleportation. -
setPreviousLocation
Set the location of the player's previous location. -
addTrackingCooldownCommand
Register the tracking of delays between command executions. -
addTrackingCooldownCommand
Register the tracking of delays between command executions. -
getTrackingMap
A map of players who cannot currently reuse a command. -
getTrackingMap
A map of players who cannot currently reuse a command. -
updateLastActivity
Updating the time of the player's last activity -
getLastActivity
Getting the time of the last activity of the player. -
isAfk
Checks the status of the player's current activity.- Returns:
- If false, then the player was recently active.
If true, then the time has passed since the last activity of the player specified in the configuration of the plugin.
-
setAfkStatus
Assigning AFK status to a player. -
switchSpyCommand
Switching the player's status of listening to the commands of other players.
A player will not be added if he does not have permission to listen to commands. -
isSpyCommand
Whether the player listens to other players' commands. -
setVanishTime
Specify the current time as the activation time of invisibility in the player. -
isVanished
If true, the player is invisible and will be shown as offline in the `/seen` command.
In this case, the time of the last activity will be equal to the activation time of invisibility. -
getVanishEnabledTime
The invisibility activation time with the `/vanish` command. -
removeVanishEnabledTime
Removing the invisibility activation time. -
addReply
Adding Audience for the /reply command -
removeReply
Removing Audience for the /reply command -
getReply
Getting Audience for the /reply command -
getPlayerMods
Deprecated.
-