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
Fields Modifier and Type Field Description static java.util.Set<java.util.UUID>
firstJoinSet
-
Method Summary
Modifier and Type Method Description IResourcePackStatusEvent
callPackStatusEvent(java.util.UUID playerId, ResourcePackStatus status)
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 idvoid
disable()
Disable the pluginvoid
executeCommand(java.lang.String command)
Execute a console commandboolean
executeCommand(java.util.UUID playerId, java.lang.String command)
Make a player execute a commandde.themoep.resourcepacksplugin.core.ResourcePack
getLocalPack(java.util.UUID playerId)
Get a pack that depends on the implementation that the server runs on e.g.de.themoep.metrics.MoepMetrics
getMetrics()
Get our metricsStatusManager
getPackManager()
Get the manager that manages all the packs and status reactionsjava.lang.String
getPlayerLocation(java.util.UUID playerId)
Get the name of the current server (on Bungee or world (on Bukkit) a player is inde.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor
getPluginCommand()
Get the main plugin command executorjava.lang.String
getServerVersion()
StatusManager
getStatusManager()
Deprecated.int
getStoredCount(de.themoep.resourcepacksplugin.core.ResourcePack pack)
Get the amount of players that have a certain pack storedboolean
hasPermission(java.util.UUID playerId, java.lang.String permission)
Check whether or not a player has a certain permissiondefault boolean
isFirstJoin(java.util.UUID playerId)
Check whether or not this is the first join of the playerboolean
isValidDestination(java.lang.String destination)
Check whether or not a destination (world or server depending on implementation) existsvoid
kick(java.util.UUID playerId, java.lang.String message)
Kick a player with a messagedefault void
onQuit(java.util.UUID playerId)
int
runTaskLater(java.lang.Runnable runnable, int delay)
Run a task laterboolean
sendActionBar(java.util.UUID playerId, java.lang.String message)
Send an actionbar message to a playerboolean
sendMessage(java.util.UUID playerId, java.lang.String message)
Send a message to a playerboolean
sendTitle(java.util.UUID playerId, java.lang.String title, java.lang.String subTitle)
Send a title and subtitle to a player with default timings (10, 70, 20)boolean
sendTitle(java.util.UUID playerId, java.lang.String title, java.lang.String subTitle, int fadeIn, int stay, int fadeOut)
Send a title and subtitle to a playervoid
sendTo(java.util.UUID playerId, java.lang.String name, java.util.function.Consumer<java.lang.Boolean> callback)
Send a player to a server (on Bungee) or world (on Bukkit)default void
setFirstJoin(java.util.UUID playerId, boolean firstJoin)
Set whether or not this is the first join of the playerdefault void
setupCommands()
default void
startupMessage()
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, getPlayerPackFormat, getPlayerProtocol, getPluginLogger, getStoredPack, getUserManager, getVersion, hasMessage, isAuthenticated, isEnabled, isUsepackTemporary, loadConfig, log, log, logDebug, logDebug, reloadConfig, resendPack, runAsyncTask, runTask, saveConfigChanges, sendMessage, sendMessage, sendPack, setPack, setStoredPack
-
Field Details
-
firstJoinSet
static final java.util.Set<java.util.UUID> firstJoinSet
-
-
Method Details
-
setupCommands
default void setupCommands() -
startupMessage
default void startupMessage()- Specified by:
startupMessage
in interfacede.themoep.resourcepacksplugin.core.ResourcepacksPlugin
-
isFirstJoin
default boolean isFirstJoin(java.util.UUID playerId)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
default void setFirstJoin(java.util.UUID playerId, boolean firstJoin)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
-
getServerVersion
java.lang.String getServerVersion()- Specified by:
getServerVersion
in interfacede.themoep.metrics.MoepMetrics.Plugin
-
runTaskLater
int runTaskLater(java.lang.Runnable runnable, int delay)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
java.lang.String getPlayerLocation(java.util.UUID playerId)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
void kick(java.util.UUID playerId, java.lang.String message)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
void sendTo(java.util.UUID playerId, java.lang.String name, java.util.function.Consumer<java.lang.Boolean> callback)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
boolean sendMessage(java.util.UUID playerId, java.lang.String message)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
boolean hasPermission(java.util.UUID playerId, java.lang.String permission)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
boolean sendTitle(java.util.UUID playerId, java.lang.String title, java.lang.String subTitle)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
boolean sendTitle(java.util.UUID playerId, java.lang.String title, java.lang.String subTitle, int fadeIn, int stay, int fadeOut)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
boolean sendActionBar(java.util.UUID playerId, java.lang.String message)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
StatusManager getPackManager()Get the manager that manages all the packs and status reactions- Specified by:
getPackManager
in interfacede.themoep.resourcepacksplugin.core.ResourcepacksPlugin
- Returns:
- The StatusManager
-
getStatusManager
Deprecated.UsegetPackManager()
Get the manager that manages all the status reactions- Returns:
- The StatusManager
-
getMetrics
de.themoep.metrics.MoepMetrics getMetrics()Get our metrics- Returns:
- Our metrics
-
executeCommand
void executeCommand(java.lang.String command)Execute a console command- Parameters:
command
- The command string to execute
-
executeCommand
boolean executeCommand(java.util.UUID playerId, java.lang.String command)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
boolean isValidDestination(java.lang.String destination)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
de.themoep.resourcepacksplugin.core.ResourcePack getLocalPack(java.util.UUID playerId)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
-
onQuit
default void onQuit(java.util.UUID playerId) -
callPackStatusEvent
-
getPluginCommand
de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor getPluginCommand()Get the main plugin command executor- Returns:
- The main plugin command executor
-
getPackManager()