Package de.jvstvshd.necrify.common
Class AbstractNecrifyPlugin
java.lang.Object
de.jvstvshd.necrify.common.AbstractNecrifyPlugin
- All Implemented Interfaces:
de.jvstvshd.necrify.api.Necrify
public abstract class AbstractNecrifyPlugin
extends Object
implements de.jvstvshd.necrify.api.Necrify
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected ExecutorServicestatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract NecrifyKickcreateKick(net.kyori.adventure.text.Component reason, de.jvstvshd.necrify.api.user.NecrifyUser user, UUID punishmentUuid) getDefaultReason(de.jvstvshd.necrify.api.punishment.StandardPunishmentType type) @NotNull ExecutorServiceabstract org.slf4j.Logger@NotNull ExecutorServiceabstract booleanfinal voidregisterCommands(org.incendo.cloud.CommandManager<de.jvstvshd.necrify.api.user.NecrifyUser> manager, boolean topLevelCommands) Registers commands for the plugin via theAnnotationParserfrom the cloud framework.final voidRegisters the punishment types of the plugin to thePunishmentTypeRegistry.abstract voidsetWhitelistActive(boolean active) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.jvstvshd.necrify.api.Necrify
getEventDispatcher, getMessageProvider, getPlayerResolver, getPunishment, getPunishmentManager, getUserManager, setEventDispatcher, setMessageProvider, setPlayerResolver, setPunishmentManager, setUserManager
-
Field Details
-
VERSION
- See Also:
-
GIT_COMMIT
- See Also:
-
BUILD_NUMBER
- See Also:
-
executorService
-
-
Constructor Details
-
AbstractNecrifyPlugin
-
-
Method Details
-
getExecutor
- Specified by:
getExecutorin interfacede.jvstvshd.necrify.api.Necrify
-
getService
- Specified by:
getServicein interfacede.jvstvshd.necrify.api.Necrify
-
registerRegistries
public final void registerRegistries()Registers the punishment types of the plugin to thePunishmentTypeRegistry. This method should be called before any user-input is processed, as the registry is used to determine the type of punishment that should be created. -
registerCommands
public final void registerCommands(org.incendo.cloud.CommandManager<de.jvstvshd.necrify.api.user.NecrifyUser> manager, boolean topLevelCommands) Registers commands for the plugin via theAnnotationParserfrom the cloud framework. It is possible to only register the commands of the /necrify root, but also the top-level ones (e.g. /ban, /kick, etc.).- Parameters:
manager- the command manager to register the commands to.topLevelCommands- whether to register top-level commands (/ban, /kick, etc.) or not (i.e. only /necrify commands).
-
getDefaultReason
-
createKick
public abstract NecrifyKick createKick(net.kyori.adventure.text.Component reason, de.jvstvshd.necrify.api.user.NecrifyUser user, UUID punishmentUuid) -
getLogger
public abstract org.slf4j.Logger getLogger() -
getOnlinePlayers
-
isWhitelistActive
public abstract boolean isWhitelistActive() -
setWhitelistActive
- Throws:
IOException
-