Class WorldResourcepacks

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
de.themoep.resourcepacksplugin.bukkit.WorldResourcepacks
All Implemented Interfaces:
de.themoep.resourcepacksplugin.core.ResourcepacksPlugin, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class WorldResourcepacks extends org.bukkit.plugin.java.JavaPlugin implements de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
Created by Phoenix616 on 18.03.2015.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected de.themoep.resourcepacksplugin.core.commands.ResourcepacksPluginCommandExecutor
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent
    callPackSelectEvent(UUID playerId, List<de.themoep.resourcepacksplugin.core.ResourcePack> packs, de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status status)
     
    de.themoep.resourcepacksplugin.core.events.IResourcePackSendEvent
    callPackSendEvent(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
     
    boolean
    checkPermission(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, String perm)
     
    boolean
    checkPermission(UUID playerId, String perm)
     
    void
    clearPack(UUID playerId)
     
    void
    clearPack(org.bukkit.entity.Player player)
     
    net.md_5.bungee.api.chat.BaseComponent[]
    getComponents(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String key, String... replacements)
    Get message components from the language config
    getConfigMap(Object configuration)
     
    protected de.themoep.resourcepacksplugin.bukkit.internal.InternalHelper
    Get the internal helper
     
    getMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String key, String... replacements)
     
    de.themoep.resourcepacksplugin.core.SubChannelHandler<org.bukkit.entity.Player>
    Get the handler for sub channels that listens on the "rp:plugin" channel to register new sub channels
    de.themoep.resourcepacksplugin.core.PackManager
     
    int
     
    de.themoep.resourcepacksplugin.core.PlatformType
     
    de.themoep.resourcepacksplugin.core.ResourcepacksPlayer
    getPlayer(String playerName)
     
    de.themoep.resourcepacksplugin.core.ResourcepacksPlayer
    getPlayer(UUID playerId)
     
    de.themoep.resourcepacksplugin.core.ResourcepacksPlayer
    getPlayer(org.bukkit.entity.Player player)
     
    de.themoep.resourcepacksplugin.core.ClientType
     
    int
     
    de.themoep.resourcepacksplugin.core.PluginLogger
     
    getStoredPack(UUID playerId)
     
    org.bukkit.configuration.ConfigurationSection
     
    de.themoep.resourcepacksplugin.core.UserManager
     
     
    boolean
    hasMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String key)
     
    boolean
     
    boolean
     
    boolean
     
    void
    log(Level level, String message)
     
    void
    log(Level level, String message, Throwable throwable)
     
    void
    logDebug(String message)
     
    void
    logDebug(String message, Throwable throwable)
     
    void
     
    void
     
    protected void
    registerCommand(de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor executor)
     
    void
    reloadConfig(boolean resend)
    Reloads the configuration from the file and resends the resource pack to all online players
    void
    removePack(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
     
    void
    removePack(org.bukkit.entity.Player player, de.themoep.resourcepacksplugin.core.ResourcePack pack)
     
    void
    removePacks(UUID playerId)
     
    void
    removePacks(org.bukkit.entity.Player player)
     
    void
    resendPack(UUID playerId)
     
    void
    resendPack(org.bukkit.entity.Player player)
    Resends the pack that corresponds to the player's world
    int
     
    int
    runTask(Runnable runnable)
     
    void
     
    boolean
    sendMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, String key, String... replacements)
     
    boolean
    sendMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer packPlayer, Level level, String key, String... replacements)
     
    void
    sendPack(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
     
    void
    sendPack(org.bukkit.entity.Player player, de.themoep.resourcepacksplugin.core.ResourcePack pack)
    Set the resourcepack of a connected player
    void
    sendPackInfo(UUID playerId)
     
    void
    setStoredPack(UUID playerId, String packName)
     

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin

    getDataFolder, getMessage, getMessage, getName, getPlayerPackFormat, isEnabled, startupMessage, supportsMultiplePacks
  • Field Details

    • pluginCommand

      protected de.themoep.resourcepacksplugin.core.commands.ResourcepacksPluginCommandExecutor pluginCommand
  • Constructor Details

    • WorldResourcepacks

      public WorldResourcepacks()
  • Method Details

    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • registerCommand

      protected void registerCommand(de.themoep.resourcepacksplugin.core.commands.PluginCommandExecutor executor)
    • loadConfig

      public boolean loadConfig()
      Specified by:
      loadConfig in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getConfigMap

      public Map<String,Object> getConfigMap(Object configuration)
      Specified by:
      getConfigMap in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • reloadConfig

      public void reloadConfig(boolean resend)
      Reloads the configuration from the file and resends the resource pack to all online players
      Specified by:
      reloadConfig in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • saveConfigChanges

      public void saveConfigChanges()
      Specified by:
      saveConfigChanges in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • setStoredPack

      public void setStoredPack(UUID playerId, String packName)
      Specified by:
      setStoredPack in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getStoredPack

      public String getStoredPack(UUID playerId)
      Specified by:
      getStoredPack in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getStoredPacks

      public org.bukkit.configuration.ConfigurationSection getStoredPacks()
    • isUsepackTemporary

      public boolean isUsepackTemporary()
      Specified by:
      isUsepackTemporary in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPermanentPackRemoveTime

      public int getPermanentPackRemoveTime()
      Specified by:
      getPermanentPackRemoveTime in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPlatformType

      public de.themoep.resourcepacksplugin.core.PlatformType getPlatformType()
      Specified by:
      getPlatformType in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • resendPack

      public void resendPack(UUID playerId)
      Specified by:
      resendPack in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • sendPackInfo

      public void sendPackInfo(UUID playerId)
      Specified by:
      sendPackInfo in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • resendPack

      public void resendPack(org.bukkit.entity.Player player)
      Resends the pack that corresponds to the player's world
      Parameters:
      player - The player to set the pack for
    • sendPack

      public void sendPack(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Specified by:
      sendPack in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • sendPack

      public void sendPack(org.bukkit.entity.Player player, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Set the resourcepack of a connected player
      Parameters:
      player - The ProxiedPlayer to set the pack for
      pack - The resourcepack to set for the player
    • removePacks

      public void removePacks(UUID playerId)
    • removePacks

      public void removePacks(org.bukkit.entity.Player player)
    • removePack

      public void removePack(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Specified by:
      removePack in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • removePack

      public void removePack(org.bukkit.entity.Player player, de.themoep.resourcepacksplugin.core.ResourcePack pack)
    • clearPack

      public void clearPack(UUID playerId)
      Specified by:
      clearPack in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • clearPack

      public void clearPack(org.bukkit.entity.Player player)
    • getPackManager

      public de.themoep.resourcepacksplugin.core.PackManager getPackManager()
      Specified by:
      getPackManager in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getUserManager

      public de.themoep.resourcepacksplugin.core.UserManager getUserManager()
      Specified by:
      getUserManager in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getMessage

      public String getMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String key, String... replacements)
      Specified by:
      getMessage in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getComponents

      public net.md_5.bungee.api.chat.BaseComponent[] getComponents(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String key, String... replacements)
      Get message components from the language config
      Parameters:
      sender - The sender to get the message from, will use the client language if available
      key - The message key
      replacements - Optional placeholder replacement array
      Returns:
      The components or an error message if not available, never null
    • hasMessage

      public boolean hasMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer sender, String key)
      Specified by:
      hasMessage in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getVersion

      public String getVersion()
      Specified by:
      getVersion in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPluginLogger

      public de.themoep.resourcepacksplugin.core.PluginLogger getPluginLogger()
      Specified by:
      getPluginLogger in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • logDebug

      public void logDebug(String message)
      Specified by:
      logDebug in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • logDebug

      public void logDebug(String message, Throwable throwable)
      Specified by:
      logDebug in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getLogLevel

      public Level getLogLevel()
      Specified by:
      getLogLevel in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPlayer

      public de.themoep.resourcepacksplugin.core.ResourcepacksPlayer getPlayer(UUID playerId)
      Specified by:
      getPlayer in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPlayer

      public de.themoep.resourcepacksplugin.core.ResourcepacksPlayer getPlayer(String playerName)
      Specified by:
      getPlayer in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPlayer

      public de.themoep.resourcepacksplugin.core.ResourcepacksPlayer getPlayer(org.bukkit.entity.Player player)
    • sendMessage

      public boolean sendMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, String key, String... replacements)
      Specified by:
      sendMessage in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • sendMessage

      public boolean sendMessage(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer packPlayer, Level level, String key, String... replacements)
      Specified by:
      sendMessage in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • log

      public void log(Level level, String message)
      Specified by:
      log in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • log

      public void log(Level level, String message, Throwable throwable)
      Specified by:
      log in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • checkPermission

      public boolean checkPermission(de.themoep.resourcepacksplugin.core.ResourcepacksPlayer player, String perm)
      Specified by:
      checkPermission in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • checkPermission

      public boolean checkPermission(UUID playerId, String perm)
      Specified by:
      checkPermission in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPlayerProtocol

      public int getPlayerProtocol(UUID playerId)
      Specified by:
      getPlayerProtocol in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getPlayerClientType

      public de.themoep.resourcepacksplugin.core.ClientType getPlayerClientType(UUID playerId)
      Specified by:
      getPlayerClientType in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • callPackSelectEvent

      public de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent callPackSelectEvent(UUID playerId, List<de.themoep.resourcepacksplugin.core.ResourcePack> packs, de.themoep.resourcepacksplugin.core.events.IResourcePackSelectEvent.Status status)
      Specified by:
      callPackSelectEvent in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • callPackSendEvent

      public de.themoep.resourcepacksplugin.core.events.IResourcePackSendEvent callPackSendEvent(UUID playerId, de.themoep.resourcepacksplugin.core.ResourcePack pack)
      Specified by:
      callPackSendEvent in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • isAuthenticated

      public boolean isAuthenticated(UUID playerId)
      Specified by:
      isAuthenticated in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • runTask

      public int runTask(Runnable runnable)
      Specified by:
      runTask in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • runAsyncTask

      public int runAsyncTask(Runnable runnable)
      Specified by:
      runAsyncTask in interface de.themoep.resourcepacksplugin.core.ResourcepacksPlugin
    • getMessageChannelHandler

      public de.themoep.resourcepacksplugin.core.SubChannelHandler<org.bukkit.entity.Player> getMessageChannelHandler()
      Get the handler for sub channels that listens on the "rp:plugin" channel to register new sub channels
      Returns:
      The message channel handler
    • getInternalHelper

      protected de.themoep.resourcepacksplugin.bukkit.internal.InternalHelper getInternalHelper()
      Get the internal helper
      Returns:
      The internal helper