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 id
    void disable()
    Disable the plugin
    void executeCommand​(java.lang.String command)
    Execute a console command
    boolean executeCommand​(java.util.UUID playerId, java.lang.String command)
    Make a player execute a command
    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.
    de.themoep.metrics.MoepMetrics getMetrics()
    Get our metrics
    StatusManager getPackManager()
    Get the manager that manages all the packs and status reactions
    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
    de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor getPluginCommand()
    Get the main plugin command executor
    java.lang.String getServerVersion()  
    StatusManager getStatusManager()
    Deprecated.
    int getStoredCount​(de.themoep.resourcepacksplugin.core.ResourcePack pack)
    Get the amount of players that have a certain pack stored
    boolean hasPermission​(java.util.UUID playerId, java.lang.String permission)
    Check whether or not a player has a certain permission
    default boolean isFirstJoin​(java.util.UUID playerId)
    Check whether or not this is the first join of the player
    boolean isValidDestination​(java.lang.String destination)
    Check whether or not a destination (world or server depending on implementation) exists
    void kick​(java.util.UUID playerId, java.lang.String message)
    Kick a player with a message
    default void onQuit​(java.util.UUID playerId)  
    int runTaskLater​(java.lang.Runnable runnable, int delay)
    Run a task later
    boolean sendActionBar​(java.util.UUID playerId, java.lang.String message)
    Send an actionbar message to a player
    boolean sendMessage​(java.util.UUID playerId, java.lang.String message)
    Send a message to a player
    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)
    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
    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)
    default void setFirstJoin​(java.util.UUID playerId, boolean firstJoin)
    Set whether or not this is the first join of the player
    default 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 interface de.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 player
      firstJoin - Whether or not it is the first join
    • getServerVersion

      java.lang.String getServerVersion()
      Specified by:
      getServerVersion in interface de.themoep.metrics.MoepMetrics.Plugin
    • runTaskLater

      int runTaskLater​(java.lang.Runnable runnable, int delay)
      Run a task later
      Specified by:
      runTaskLater in interface de.themoep.metrics.MoepMetrics.Plugin
      Parameters:
      runnable - The Runnable to run
      delay - 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 kick
      message - 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 player
      name - The name of the server or world
      callback - 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 interface de.themoep.metrics.MoepMetrics.Plugin
      Parameters:
      playerId - The UUID of the player
      message - 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 interface de.themoep.metrics.MoepMetrics.Plugin
      Parameters:
      playerId - The UUID of the player
      permission - 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 player
      title - The title to send. Ampersand colorcodes will get replaced
      subTitle - 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 player
      title - The title to send. Ampersand colorcodes will get replaced
      subTitle - The subtitle to send. Ampersand colorcodes will get replaced
      fadeIn - The fade in timing
      stay - The stay timing
      fadeOut - 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 player
      message - 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 interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
      Returns:
      The StatusManager
    • getStatusManager

      @Deprecated StatusManager getStatusManager()
      Deprecated.
      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 player
      command - 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 check
      assignment - The assignment
      status - The resource pack response status
      type - 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

      IResourcePackStatusEvent callPackStatusEvent​(java.util.UUID playerId, ResourcePackStatus status)
    • getPluginCommand

      de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor getPluginCommand()
      Get the main plugin command executor
      Returns:
      The main plugin command executor