Class KingdomsCommand

java.lang.Object
org.kingdoms.commands.KingdomsCommand
Direct Known Subclasses:
CommandAccept, CommandAdminBank, CommandAdminClaim, CommandAdminCommand, CommandAdminCommands, CommandAdminCreate, CommandAdminDailyChecks, CommandAdminDisband, CommandAdminEvaluate, CommandAdminGUI, CommandAdminHologram, CommandAdminHome, CommandAdminInfoPlayer, CommandAdminItemInject, CommandAdminItemResourcePoints, CommandAdminItemStructure, CommandAdminItemTurret, CommandAdminJoin, CommandAdminKick, CommandAdminLand, CommandAdminMasswar, CommandAdminMaxLandModifier, CommandAdminNationDisband, CommandAdminNexus, CommandAdminPacifism, CommandAdminPermanent, CommandAdminRank, CommandAdminRename, CommandAdminRepl, CommandAdminResourcePoints, CommandAdminShield, CommandAdminSound, CommandAdminSpy, CommandAdminTest, CommandAdminToggle, CommandAdminToggles, CommandAdminTrack, CommandAdminTurret, CommandAdminUnclaimAll, CommandAlly, CommandBank, CommandBookDiscard, CommandBookEdit, CommandBookOpen, CommandBookPreview, CommandBookRemove, CommandBookRename, CommandBroadcast, CommandChat, CommandClaimAuto, CommandClaimClipboard, CommandClaimConfirm, CommandClaimCorner, CommandClaimFill, CommandClaimLine, CommandClaimSquare, CommandColor, CommandCreate, CommandDecline, CommandDemote, CommandDisband, CommandDonate, CommandElectionStatement, CommandElectionVote, CommandEnemy, CommandExtractor, CommandFly, CommandGlow, CommandHelp, CommandHome, CommandInvade, CommandInventory, CommandInvite, CommandInvites, CommandJoin, CommandKick, CommandKing, CommandLanguage, CommandLeave, CommandLore, CommandMailOpen, CommandMailReply, CommandMapSettings, CommandMute, CommandNationAccept, CommandNationBank, CommandNationBroadcast, CommandNationCapital, CommandNationCreate, CommandNationDecline, CommandNationDemote, CommandNationDisband, CommandNationInvite, CommandNationJoin, CommandNationKick, CommandNationLeave, CommandNationNexusOpen, CommandNationPromote, CommandNationRename, CommandNationRevoke, CommandNationSetSpawn, CommandNationShow, CommandNationSpawn, CommandNationTag, CommandNationTop, CommandNationUnsetspawn, CommandNexusOpen, CommandNexusRemove, CommandPromote, CommandPvP, CommandRedo, CommandRejectRelation, CommandRelations, CommandReload, CommandRename, CommandResourcePointsConverter, CommandResourcePointsDeposit, CommandResourcePointsTransferKingdom, CommandResourcePointsTransferNation, CommandResourcePointsWithdraw, CommandRevoke, CommandSell, CommandSetHome, CommandShield, CommandShow, CommandSneak, CommandSurrender, CommandTag, CommandTeleport, CommandTop, CommandTpa, CommandTpaAccept, CommandTpaReject, CommandTradable, CommandTruce, CommandUnclaimAll, CommandUnclaimAuto, CommandUndo, CommandUnmute, CommandUnsetHome, CommandUpdates, CommandVault, CommandVisualizeAll, CommandVisualizeMarkers, CommandVisualizePermanent, CommandVisualizeToggle, HandlerNationRel, KingdomsParentCommand

public abstract class KingdomsCommand extends Object
Note that both the command name (identifier) and displayname must be unique for all the commands.
  • Field Details

    • plugin

      protected static final Kingdoms plugin
    • COLORIZE_TAB_COMPLETES

      public static final boolean COLORIZE_TAB_COMPLETES
    • permission

      protected final @NonNull org.bukkit.permissions.Permission permission
    • bypassCooldownPermission

      protected final @NonNull org.bukkit.permissions.Permission bypassCooldownPermission
    • bypassDisabledWorldsPermission

      protected final @NonNull org.bukkit.permissions.Permission bypassDisabledWorldsPermission
    • name

      protected final @NonNull String name
    • path

      protected final String[] path
    • parent

      protected final @Nullable KingdomsParentCommand parent
    • description

      protected final @Nullable Messenger description
    • disabledWorlds

      protected final @NonNull Set<String> disabledWorlds
    • aliases

      protected final @NonNull Map<SupportedLanguage,List<String>> aliases
    • cooldown

      protected final long cooldown
  • Constructor Details

    • KingdomsCommand

      public KingdomsCommand(@Pattern("[a-zA-Z0-9]+") @NonNull String name, @Nullable KingdomsParentCommand parent, org.bukkit.permissions.PermissionDefault permissionDefault)
    • KingdomsCommand

      public KingdomsCommand(@NonNull String name)
    • KingdomsCommand

      public KingdomsCommand(@NonNull String name, boolean playersCmd)
    • KingdomsCommand

      public KingdomsCommand(@Pattern("[a-zA-Z0-9]+") @NonNull String name, KingdomsParentCommand parent)
      The permission is inherited from the parent
  • Method Details

    • getAliases

      @NotNull public @Unmodifiable @NotNull Map<SupportedLanguage,List<String>> getAliases()
    • setPermissionDefault

      public void setPermissionDefault(org.bukkit.permissions.PermissionDefault permissionDefault)
    • unregisterPermissions

      public void unregisterPermissions()
    • joinArgs

      public static String joinArgs(String[] args)
    • joinArgs

      public static String joinArgs(String[] args, int from)
    • canBypassDisabledWorlds

      public boolean canBypassDisabledWorlds(org.bukkit.command.CommandSender sender)
    • canBypassCooldown

      public boolean canBypassCooldown(org.bukkit.command.CommandSender sender)
    • processTabMessage

      public static String processTabMessage(String str)
    • tabComplete

      public static List<String> tabComplete(String completion)
    • tabComplete

      public static List<String> tabComplete(String... completions)
    • tabComplete

      public static List<String> tabComplete(Collection<String> completions)
    • getPlayer

      protected static org.bukkit.OfflinePlayer getPlayer(org.bukkit.command.CommandSender sender, String name)
    • emptyTab

      protected static List<String> emptyTab()
    • getUsage

      public Messenger getUsage()
    • parseBool

      public static Boolean parseBool(String str)
    • getDisabledWorlds

      public @NonNull Set<String> getDisabledWorlds()
    • getCooldown

      public long getCooldown()
    • isDisabled

      protected boolean isDisabled()
    • getPermission

      public @NonNull org.bukkit.permissions.Permission getPermission()
    • hasPermission

      public boolean hasPermission(@NonNull org.bukkit.command.CommandSender sender)
    • hasPermission

      public boolean hasPermission(org.bukkit.command.CommandSender sender, String perm)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • lang

      public Messenger lang(String... path)
    • execute

      public void execute(@NonNull CommandContext context)
    • executeX

      @NotNull public @NotNull CommandResult executeX(@NonNull CommandContext context)
    • tabComplete

      @Deprecated public List<@NonNull String> tabComplete(@NonNull org.bukkit.command.CommandSender sender, @NonNull String[] args)
      Deprecated.
    • tabComplete

      public @NonNull List<String> tabComplete(@NonNull CommandTabContext context)
    • getDisplayName

      public final @NonNull Messenger getDisplayName()
    • getName

      public final @NonNull String getName()
    • getParent

      public final @Nullable KingdomsParentCommand getParent()
    • getDescription

      public final @Nullable Messenger getDescription()