Package dev.majek.pc
Class PartyChat
- java.lang.Object
-
- org.bukkit.plugin.PluginBase
-
- org.bukkit.plugin.java.JavaPlugin
-
- dev.majek.pc.PartyChat
-
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
public final class PartyChat extends org.bukkit.plugin.java.JavaPlugin
Main plugin class. All handlers should be obtained from here.- Author:
- Majekdor
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
hasDiscordSRV
True if PartyChat is hooked into DiscordSRV.static boolean
hasEssentials
True if PartyChat is hooked into Essentials.static boolean
hasHDB
True if PartyChat is hooked into HeadDatabase.static boolean
hasLiteBans
True if PartyChat is hooked into LiteBans.static boolean
hasPapi
True if PartyChat is hooked into PlaceholderAPI.static boolean
hasUpdate
static boolean
hasVault
True if PartyChat is hooked into Vault.
-
Constructor Summary
Constructors Constructor Description PartyChat()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PartyChatApi
api()
Get the PartyChat API.static CommandHandler
commandHandler()
Get PartyChat's command handler.static PartyChat
core()
Get main PartyChat class.static DataHandler
dataHandler()
Get PartyChat's data handler.static void
debug(@Nullable org.bukkit.entity.Player player, @NotNull String string)
Send a debug message to console and a player.static void
error(@NotNull Object object)
Log an error to console.static GuiHandler
guiHandler()
Get PartyChat's GUI handler.static @Nullable net.dv8tion.jda.api.JDA
jda()
Get the PartyChat JDA connection if it exists.static LanguageHandler
languageHandler()
Get PartyChat's language handler.static void
log(@NotNull Object object)
Log an object to console.static void
logError(@NotNull Throwable ex, @Nullable String message)
Log an exception to console and the plugin's log.static void
logToDiscord(@NotNull String message)
Log a message to the Discord channel defined in the config.ymlstatic MechanicHandler
mechanicHandler()
Get PartyChat's mechanic handler.static MessageHandler
messageHandler()
Get PartyChat's message handler.void
onDisable()
void
onEnable()
static PartyHandler
partyHandler()
Get PartyChat's party handler.-
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
-
-
-
-
Field Detail
-
hasEssentials
public static boolean hasEssentials
True if PartyChat is hooked into Essentials.
-
hasLiteBans
public static boolean hasLiteBans
True if PartyChat is hooked into LiteBans.
-
hasVault
public static boolean hasVault
True if PartyChat is hooked into Vault.
-
hasPapi
public static boolean hasPapi
True if PartyChat is hooked into PlaceholderAPI.
-
hasDiscordSRV
public static boolean hasDiscordSRV
True if PartyChat is hooked into DiscordSRV.
-
hasHDB
public static boolean hasHDB
True if PartyChat is hooked into HeadDatabase.
-
hasUpdate
public static boolean hasUpdate
-
-
Method Detail
-
onEnable
public void onEnable()
- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()
- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in classorg.bukkit.plugin.java.JavaPlugin
-
core
public static PartyChat core()
Get main PartyChat class.- Returns:
- PartyChat
-
dataHandler
public static DataHandler dataHandler()
Get PartyChat's data handler. This class deals with config files and data storage.- Returns:
- DataHandler
-
mechanicHandler
public static MechanicHandler mechanicHandler()
Get PartyChat's mechanic handler. This class deals with events and other game mechanics.- Returns:
- MechanicHandler.
-
commandHandler
public static CommandHandler commandHandler()
Get PartyChat's command handler. This class stores the command map and registers commands.- Returns:
- CommandHandler.
-
guiHandler
public static GuiHandler guiHandler()
Get PartyChat's GUI handler. This class stores active GUIs and deals with inventory events.- Returns:
- GuiHandler
-
languageHandler
public static LanguageHandler languageHandler()
Get PartyChat's language handler. This class deals with the plugin's language configuration.- Returns:
- LanguageHandler
-
partyHandler
public static PartyHandler partyHandler()
Get PartyChat's party handler. This class deals with party saving and loading.- Returns:
- PartyHandler
-
messageHandler
public static MessageHandler messageHandler()
Get PartyChat's message handler. This class deals with all plugin messages and sending.- Returns:
- MessageHandler
-
api
public static PartyChatApi api()
Get the PartyChat API. This class contains helpful API methods.- Returns:
- PartyChatAPI
-
jda
@Nullable public static @Nullable net.dv8tion.jda.api.JDA jda()
Get the PartyChat JDA connection if it exists.- Returns:
- JDA
-
log
public static void log(@NotNull @NotNull Object object)
Log an object to console.- Parameters:
object
- The object to log.
-
logToDiscord
public static void logToDiscord(@NotNull @NotNull String message)
Log a message to the Discord channel defined in the config.yml- Parameters:
message
- The message to log.
-
error
public static void error(@NotNull @NotNull Object object)
Log an error to console.- Parameters:
object
- The error to log.
-
debug
public static void debug(@Nullable @Nullable org.bukkit.entity.Player player, @NotNull @NotNull String string)
Send a debug message to console and a player.- Parameters:
player
- The player to send the message to.string
- The message to send.
-
-