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.JavaPluginMain plugin class. All handlers should be obtained from here.- Author:
- Majekdor
-
-
Field Summary
Fields Modifier and Type Field Description static booleanhasDiscordSRVTrue if PartyChat is hooked into DiscordSRV.static booleanhasEssentialsTrue if PartyChat is hooked into Essentials.static booleanhasHDBTrue if PartyChat is hooked into HeadDatabase.static booleanhasLiteBansTrue if PartyChat is hooked into LiteBans.static booleanhasPapiTrue if PartyChat is hooked into PlaceholderAPI.static booleanhasUpdatestatic booleanhasVaultTrue 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 PartyChatApiapi()Get the PartyChat API.static CommandHandlercommandHandler()Get PartyChat's command handler.static PartyChatcore()Get main PartyChat class.static DataHandlerdataHandler()Get PartyChat's data handler.static voiddebug(@Nullable org.bukkit.entity.Player player, @NotNull String string)Send a debug message to console and a player.static voiderror(@NotNull Object object)Log an error to console.static GuiHandlerguiHandler()Get PartyChat's GUI handler.static @Nullable net.dv8tion.jda.api.JDAjda()Get the PartyChat JDA connection if it exists.static LanguageHandlerlanguageHandler()Get PartyChat's language handler.static voidlog(@NotNull Object object)Log an object to console.static voidlogError(@NotNull Throwable ex, @Nullable String message)Log an exception to console and the plugin's log.static voidlogToDiscord(@NotNull String message)Log a message to the Discord channel defined in the config.ymlstatic MechanicHandlermechanicHandler()Get PartyChat's mechanic handler.static MessageHandlermessageHandler()Get PartyChat's message handler.voidonDisable()voidonEnable()static PartyHandlerpartyHandler()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:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()
- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein 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.
-
-