Class ConfluxCommands

java.lang.Object
com.iantapply.conflux.paper.command.ConfluxCommands

public final class ConfluxCommands extends Object
Small command trees that adapt Paper senders to Conflux's ghost service.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Immutable operational values displayed by /conflux.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Permission required for the Conflux status command.
    static final String
    Permission required for per-player ghost-density commands.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfluxCommands(Supplier<ConfluxCommands.Status> status, ToIntFunction<org.bukkit.entity.Player> viewerLimit, ObjIntConsumer<org.bukkit.entity.Player> viewerLimitUpdater, int maximumPerViewer)
    Creates the command adapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack>
    Builds the complete /conflux administration command tree.
    com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack>
    Builds the complete /ghosts player-preference command tree.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ADMIN_PERMISSION

      public static final String ADMIN_PERMISSION
      Permission required for the Conflux status command.
      See Also:
    • GHOSTS_PERMISSION

      public static final String GHOSTS_PERMISSION
      Permission required for per-player ghost-density commands.
      See Also:
  • Constructor Details

    • ConfluxCommands

      public ConfluxCommands(Supplier<ConfluxCommands.Status> status, ToIntFunction<org.bukkit.entity.Player> viewerLimit, ObjIntConsumer<org.bukkit.entity.Player> viewerLimitUpdater, int maximumPerViewer)
      Creates the command adapter.
      Parameters:
      status - current operational status supplier
      viewerLimit - function returning a player's active ghost limit
      viewerLimitUpdater - operation updating a player's ghost limit
      maximumPerViewer - configured maximum ghost limit
  • Method Details

    • createAdmin

      public com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> createAdmin()
      Builds the complete /conflux administration command tree.
      Returns:
      lifecycle-registerable administration command root
    • createGhosts

      public com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> createGhosts()
      Builds the complete /ghosts player-preference command tree.
      Returns:
      lifecycle-registerable player command root