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 Details

  • Constructor Details

    • AbstractNecrifyPlugin

      public AbstractNecrifyPlugin(ExecutorService executorService)
  • Method Details

    • getExecutor

      @NotNull public @NotNull ExecutorService getExecutor()
      Specified by:
      getExecutor in interface de.jvstvshd.necrify.api.Necrify
    • getService

      @NotNull public @NotNull ExecutorService getService()
      Specified by:
      getService in interface de.jvstvshd.necrify.api.Necrify
    • registerRegistries

      public final void registerRegistries()
      Registers the punishment types of the plugin to the PunishmentTypeRegistry. 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 the AnnotationParser from 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

      public String getDefaultReason(de.jvstvshd.necrify.api.punishment.StandardPunishmentType type)
    • 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

      public abstract Set<org.incendo.cloud.type.tuple.Pair<String,UUID>> getOnlinePlayers()
    • isWhitelistActive

      public abstract boolean isWhitelistActive()
    • setWhitelistActive

      public abstract void setWhitelistActive(boolean active) throws IOException
      Throws:
      IOException