Class ConfluxCommands
java.lang.Object
com.iantapply.conflux.paper.command.ConfluxCommands
Small command trees that adapt Paper senders to Conflux's ghost service.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordImmutable operational values displayed by/conflux. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConfluxCommands(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 TypeMethodDescriptioncom.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> Builds the complete/confluxadministration command tree.com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> Builds the complete/ghostsplayer-preference command tree.
-
Field Details
-
ADMIN_PERMISSION
Permission required for the Conflux status command.- See Also:
-
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 supplierviewerLimit- function returning a player's active ghost limitviewerLimitUpdater- operation updating a player's ghost limitmaximumPerViewer- configured maximum ghost limit
-
-
Method Details
-
createAdmin
public com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> createAdmin()Builds the complete/confluxadministration 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/ghostsplayer-preference command tree.- Returns:
- lifecycle-registerable player command root
-