Interface ForceResourcepacksPlugin
- All Superinterfaces:
de.themoep.metrics.MoepMetrics.Plugin
,de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
- All Known Implementing Classes:
ForceResourcepacks
,ForceResourcepacks
,ForceResourcepacks
public interface ForceResourcepacksPlugin
extends de.themoep.resourcepacksplugin.core.ResourcepacksPlugin, de.themoep.metrics.MoepMetrics.Plugin
Created by Phoenix616 on 11.04.2016.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
calculateRequired
(UUID playerId, PackActionAssignment assignment) Calculate whether a player is required to accept a pack of a specific assignmentdefault IResourcePackStatusEvent
callPackStatusEvent
(UUID playerId, ResourcePackStatus status) Deprecated.callPackStatusEvent
(UUID playerId, ResourcePackStatus status, de.themoep.resourcepacksplugin.core.ResourcePack pack) default boolean
canBypass
(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, PackActionAssignment assignment, ResourcePackStatus status, ActionType type) Check whether or not a player can bypass a certain combination of assignments, statuses and action types.void
cancelTask
(int taskId) Cancel a task with a specific iddefault void
clearFirstJoin
(UUID playerId) Remove first join information of the playervoid
disable()
Disable the pluginvoid
executeCommand
(String command) Execute a console commandboolean
executeCommand
(UUID playerId, String command) Make a player execute a commandde.themoep.resourcepacksplugin.core.ResourcePack
getLocalPack
(UUID playerId) Get a pack that depends on the implementation that the server runs on e.g.de.themoep.metrics.MoepMetrics
Get our metricsGet the manager that manages all the packs and status actionsgetPlayerLocation
(UUID playerId) Get the name of the current server (on Bungee or world (on Bukkit) a player is inde.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor
Get the main plugin command executorint
getStoredCount
(de.themoep.resourcepacksplugin.core.ResourcePack pack) Get the amount of players that have a certain pack storedGet the manager that manages all the user packs and statusesboolean
hasPermission
(UUID playerId, String permission) Check whether or not a player has a certain permissiondefault boolean
isFirstJoin
(UUID playerId) Check whether or not this is the first join of the playerboolean
isValidDestination
(String destination) Check whether or not a destination (world or server depending on implementation) existsvoid
Kick a player with a messagedefault void
boolean
Get whether or not actions only run when a pack was sent beforeint
runTaskLater
(Runnable runnable, int delay) Run a task laterboolean
sendActionBar
(UUID playerId, String message) Send an actionbar message to a playerboolean
sendMessage
(UUID playerId, String message) Send a message to a playerboolean
Send a title and subtitle to a player with default timings (10, 70, 20)boolean
Send a title and subtitle to a playervoid
Send a player to a server (on Bungee) or world (on Bukkit)default void
setFirstJoin
(UUID playerId, boolean firstJoin) Set whether or not this is the first join of the playerdefault void
default void
Methods inherited from interface de.themoep.metrics.MoepMetrics.Plugin
getFile, getName, getVersion, log, runAsyncTask
Methods inherited from interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
callPackSelectEvent, callPackSendEvent, checkPermission, checkPermission, clearPack, getConfigMap, getDataFolder, getLogLevel, getMessage, getMessage, getMessage, getName, getPermanentPackRemoveTime, getPlayer, getPlayer, getPlayerClientType, getPlayerPackFormat, getPlayerProtocol, getPluginLogger, getStoredPack, getVersion, hasMessage, isAuthenticated, isEnabled, isUsepackTemporary, loadConfig, log, log, logDebug, logDebug, reloadConfig, removePack, resendPack, runAsyncTask, runTask, saveConfigChanges, sendMessage, sendMessage, sendPack, sendPackInfo, setStoredPack, supportsMultiplePacks
-
Field Details
-
firstJoinSet
-
-
Method Details
-
setupCommands
default void setupCommands() -
startupMessage
default void startupMessage()- Specified by:
startupMessage
in interfacede.themoep.resourcepacksplugin.core.ResourcepacksPlugin
-
isFirstJoin
Check whether or not this is the first join of the player- Parameters:
playerId
- The UUID of the player- Returns:
- true if the player has played before; false if not
-
setFirstJoin
Set whether or not this is the first join of the player- Parameters:
playerId
- The UUID of the playerfirstJoin
- Whether or not it is the first join
-
clearFirstJoin
Remove first join information of the player- Parameters:
playerId
- The UUID of the player
-
getServerVersion
String getServerVersion()- Specified by:
getServerVersion
in interfacede.themoep.metrics.MoepMetrics.Plugin
-
runTaskLater
Run a task later- Specified by:
runTaskLater
in interfacede.themoep.metrics.MoepMetrics.Plugin
- Parameters:
runnable
- The Runnable to rundelay
- The delay in seconds after which to run the task- Returns:
- The task's id
-
cancelTask
void cancelTask(int taskId) Cancel a task with a specific id- Parameters:
taskId
- The id of the task that should be cancelled
-
disable
void disable()Disable the plugin -
getPlayerLocation
Get the name of the current server (on Bungee or world (on Bukkit) a player is in- Parameters:
playerId
- The UUID of the player- Returns:
- The name of the world or server
-
kick
Kick a player with a message- Parameters:
playerId
- The UUID of the player to kickmessage
- The message to display. Ampersand colorcodes will get replaced
-
sendTo
Send a player to a server (on Bungee) or world (on Bukkit)- Parameters:
playerId
- The UUID of the playername
- The name of the server or worldcallback
- A callback executed when the player was moved and with its success state
-
sendMessage
Send a message to a player- Specified by:
sendMessage
in interfacede.themoep.metrics.MoepMetrics.Plugin
- Parameters:
playerId
- The UUID of the playermessage
- The message to send. Ampersand colorcodes will get replaced- Returns:
- true if the player is online; false if not
-
hasPermission
Check whether or not a player has a certain permission- Specified by:
hasPermission
in interfacede.themoep.metrics.MoepMetrics.Plugin
- Parameters:
playerId
- The UUID of the playerpermission
- The permission to check- Returns:
- true if the player has the permission; false if not or the player is offline
-
sendTitle
Send a title and subtitle to a player with default timings (10, 70, 20)- Parameters:
playerId
- The UUID of the playertitle
- The title to send. Ampersand colorcodes will get replacedsubTitle
- The subtitle to send. Ampersand colorcodes will get replaced- Returns:
- true if the player is online; false if not
-
sendTitle
Send a title and subtitle to a player- Parameters:
playerId
- The UUID of the playertitle
- The title to send. Ampersand colorcodes will get replacedsubTitle
- The subtitle to send. Ampersand colorcodes will get replacedfadeIn
- The fade in timingstay
- The stay timingfadeOut
- The fade out timing- Returns:
- true if the player is online; false if not
-
sendActionBar
Send an actionbar message to a player- Parameters:
playerId
- The UUID of the playermessage
- The message to send. Ampersand colorcodes will get replaced- Returns:
- true if the player is online; false if not
-
getPackManager
ActionManager getPackManager()Get the manager that manages all the packs and status actions- Specified by:
getPackManager
in interfacede.themoep.resourcepacksplugin.core.ResourcepacksPlugin
- Returns:
- The ActionManager
-
getUserManager
StatusManager getUserManager()Get the manager that manages all the user packs and statuses- Specified by:
getUserManager
in interfacede.themoep.resourcepacksplugin.core.ResourcepacksPlugin
- Returns:
- The StatusManager
-
getMetrics
de.themoep.metrics.MoepMetrics getMetrics()Get our metrics- Returns:
- Our metrics
-
executeCommand
Execute a console command- Parameters:
command
- The command string to execute
-
executeCommand
Make a player execute a command- Parameters:
playerId
- The UUID of the playercommand
- The command string to execute- Returns:
- true if the player was online; false if not
-
isValidDestination
Check whether or not a destination (world or server depending on implementation) exists- Parameters:
destination
- The name of the destination to check- Returns:
- true if it exists; false if not
-
getLocalPack
Get a pack that depends on the implementation that the server runs on e.g. from a WorldGuard region- Parameters:
playerId
- The UUID of the player- Returns:
- The pack or null if there is none
-
getStoredCount
int getStoredCount(de.themoep.resourcepacksplugin.core.ResourcePack pack) Get the amount of players that have a certain pack stored- Parameters:
pack
- The pack to check- Returns:
- The times it is stored
-
canBypass
default boolean canBypass(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, PackActionAssignment assignment, ResourcePackStatus status, ActionType type) Check whether or not a player can bypass a certain combination of assignments, statuses and action types.- Parameters:
player
- The player to checkassignment
- The assignmentstatus
- The resource pack response statustype
- The action type that is supposed to run- Returns:
true
if player has one of the bypass permissions;false
if not
-
calculateRequired
Calculate whether a player is required to accept a pack of a specific assignment- Parameters:
playerId
- The UUID of the palyer to checkassignment
- The assignment- Returns:
true
if player has to accept it;false
if the assignment is not requiring it, or they have one of the bypass permissions;
-
onQuit
-
callPackStatusEvent
@Deprecated default IResourcePackStatusEvent callPackStatusEvent(UUID playerId, ResourcePackStatus status) Deprecated. -
callPackStatusEvent
IResourcePackStatusEvent callPackStatusEvent(UUID playerId, ResourcePackStatus status, de.themoep.resourcepacksplugin.core.ResourcePack pack) -
getPluginCommand
de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor getPluginCommand()Get the main plugin command executor- Returns:
- The main plugin command executor
-
requirePackSendForActions
boolean requirePackSendForActions()Get whether or not actions only run when a pack was sent before- Returns:
- The value of the only-run-actions-after-pack-send config option
-