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 final Set<UUID>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Calculate whether a player is required to accept a pack of a specific assignment
    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 id
    default void
    clearFirstJoin(UUID playerId)
    Remove first join information of the player
    void
    Disable the plugin
    void
    Execute a console command
    boolean
    executeCommand(UUID playerId, String command)
    Make a player execute a command
    de.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 metrics
    Get the manager that manages all the packs and status actions
    Get the name of the current server (on Bungee or world (on Bukkit) a player is in
    de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor
    Get the main plugin command executor
     
    int
    getStoredCount(de.themoep.resourcepacksplugin.core.ResourcePack pack)
    Get the amount of players that have a certain pack stored
    Get the manager that manages all the user packs and statuses
    boolean
    hasPermission(UUID playerId, String permission)
    Check whether or not a player has a certain permission
    default boolean
    isFirstJoin(UUID playerId)
    Check whether or not this is the first join of the player
    boolean
    Check whether or not a destination (world or server depending on implementation) exists
    void
    kick(UUID playerId, String message)
    Kick a player with a message
    default void
    onQuit(UUID playerId)
     
    boolean
    Get whether or not actions only run when a pack was sent before
    int
    runTaskLater(Runnable runnable, int delay)
    Run a task later
    boolean
    sendActionBar(UUID playerId, String message)
    Send an actionbar message to a player
    boolean
    sendMessage(UUID playerId, String message)
    Send a message to a player
    boolean
    sendTitle(UUID playerId, String title, String subTitle)
    Send a title and subtitle to a player with default timings (10, 70, 20)
    boolean
    sendTitle(UUID playerId, String title, String subTitle, int fadeIn, int stay, int fadeOut)
    Send a title and subtitle to a player
    void
    sendTo(UUID playerId, String name, Consumer<Boolean> callback)
    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 player
    default 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

      static final Set<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(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(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
    • clearFirstJoin

      default void clearFirstJoin(UUID playerId)
      Remove first join information of the player
      Parameters:
      playerId - The UUID of the player
    • getServerVersion

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

      int runTaskLater(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

      String getPlayerLocation(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(UUID playerId, 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(UUID playerId, String name, Consumer<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(UUID playerId, 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(UUID playerId, 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(UUID playerId, String title, 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(UUID playerId, String title, 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(UUID playerId, 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

      ActionManager getPackManager()
      Get the manager that manages all the packs and status actions
      Specified by:
      getPackManager in interface de.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 interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
      Returns:
      The StatusManager
    • getMetrics

      de.themoep.metrics.MoepMetrics getMetrics()
      Get our metrics
      Returns:
      Our metrics
    • executeCommand

      void executeCommand(String command)
      Execute a console command
      Parameters:
      command - The command string to execute
    • executeCommand

      boolean executeCommand(UUID playerId, 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(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(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
    • calculateRequired

      default boolean calculateRequired(UUID playerId, PackActionAssignment assignment)
      Calculate whether a player is required to accept a pack of a specific assignment
      Parameters:
      playerId - The UUID of the palyer to check
      assignment - 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

      default void onQuit(UUID playerId)
    • 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