lilmiketkhis
📎 1 file 4,352 chars
📄
pasted-code-1783729090875.txt
txt 74 lines
▶
Advanced Feature Specification: Katana Staff Mode System (/sfmode)
1. Core System Overview
The Katana Staff Mode plugin is a comprehensive, stealth-focused administrative suite. It merges dynamic command access with deep-level server vanish mechanics. By executing /sfmode, authorized personnel enter a highly secure, invisible state that grants them access to restricted commands, removes their presence from the server's public footprint, and manipulates live server statistics to maintain absolute covert operations.

2. Permission Architecture
Access to the Staff Mode infrastructure is strictly governed by a centralized permission node, fully compatible with LuckPerms.

Required Node: katanasfmode.use

Behavior: If a player without this permission attempts to execute /sfmode, the command is silently rejected, returning the server's default "Unknown command" error to prevent unauthorized users from confirming the plugin's existence.

3. Comprehensive Stealth & Vanish Mechanics
When a staff member transitions into the ENABLED state, the plugin triggers a series of deep-level stealth protocols:

TAB List Erasure: The staff member's profile and ping are immediately purged from the server's [TAB] player list.

Entity Invisibility: The player's physical entity is hidden from all users who do not possess the katanasfmode.use permission using the server's native player-hiding API.

Tab-Complete Suppression: To prevent "ghosting" (where regular players discover hidden staff by typing a partial name and hitting the [TAB] key in chat), the plugin intercepts TabCompleteEvent or the underlying completion packets. The vanished staff member's username is entirely stripped from all auto-complete suggestions across the server.

4. Dynamic Command Injection & Security
As with the base system, the /sfmode toggle dictates what the staff member can see and execute:

Packet-Level Visibility: Commands listed in the configuration are injected into the staff member's client-side command tree upon enabling Staff Mode, allowing full auto-completion.

Execution Blackout: If Staff Mode is disabled, these commands are stripped from the client. Any manual attempt to force the command will result in a hard cancellation by the plugin, returning an "Unknown command" message.

5. PlaceholderAPI Integration (%katana_Sfmode_count)
To maintain the illusion of a standard player count, the plugin hooks directly into PlaceholderAPI to provide a manipulated online player statistic.

Placeholder: %katana_Sfmode_count

Logic: The system calculates the true player count and subtracts the number of users currently in Staff Mode (Total Online - Vanished Staff = Displayed Count).

Application: This placeholder can be utilized in scoreboards, holographic displays, and server list MOTD plugins. When a staff member types /sfmode, the server's public player count instantly drops by one, mimicking a standard player disconnection.

6. Fully Customizable Configuration (config.yml)
Every system message and restricted command is strictly defined by the configuration file, allowing for rapid iteration and localization without recompiling the plugin.

Detailed config.yml Structure:

YAML
# ========================================== #
#        Katana Staff Mode Configuration     #
# ========================================== #

settings:
  # The permission required to use /sfmode and see other vanished staff
  permission: "katanasfmode.use"

messages:
  # Prefix for all plugin messages
  prefix: "&8[&bKatana&8] "
  
  # Sent when a staff member enables Staff Mode
  mode-enabled: "&aStaff Mode has been ENABLED. You are now vanished and commands are unlocked."
  
  # Sent when a staff member disables Staff Mode
  mode-disabled: "&cStaff Mode has been DISABLED. You are now visible and commands are locked."
  
  # Sent to the player if they lack the katanasfmode.use permission
  # (Recommended to leave this as the default vanilla error for maximum security)
  no-permission: "Unknown command. Type \"/help\" for help."

staff-mode:
  # List the commands here without the '/' prefix.
  # These commands will only be visible and usable when /sfmode is toggled ON.
  restricted-commands:
    - "ban"
    - "kick"
    - "mute"
    - "history"
    - "invsee"
    - "socialspy"
Kodari AI
KodariJul 11 at 12:19 am 6
KatanaSfMode
KatanaSfMode provides a permission-controlled /sfmode system for Minecraft staff. Authorized users toggle a stealth state that hides their entities and tab-list entries from regular players, suppresses vanished names from tab completion, and reveals configured administrative commands only while active. It blocks restricted command execution outside staff mode with a configurable unknown-command response, refreshes visibility when players join or leave, integrates with LuckPerms permissions, and registers the %katana_Sfmode_count PlaceholderAPI value to show online players excluding vanished staff.
  • Create the Gradle project and plugin metadata.

  • Implement staff mode state, vanish visibility, command filtering, and tab-completion suppression.

  • Add configurable messages and restricted commands.

  • Add optional PlaceholderAPI integration for the manipulated player count.

lilmiketkhis

Theres no tab complete with it and theres not vanish

Kodari AI
KodariJul 13 at 12:53 am 5
  • Add actual vanish visibility handling for existing and newly joining players.

  • Add tab-completion filtering for vanished staff names and restricted commands.

refreshVisibility() only processed players currently in staff mode, so disabling could leave stale hidden state. The visibility pass and completion filter need to run for every player, with vanished names removed from partial suggestions.

Fixed:

  • Vanish now applies to every online player when staff mode is enabled.

  • Disabling staff mode reliably shows the player again.

  • Joining players receive the correct visibility state.

  • Restricted commands are injected into the staff member’s command tree while enabled.

  • Hidden staff names are removed from tab completion suggestions, including partial-name matches.

  • Restricted commands remain blocked when staff mode is disabled.

lilmiketkhis

And make it where when not in sfmode it doesn’t tab complete the commands in config but when im in sfmode it tab completes

Kodari AI
KodariJul 13 at 12:54 am 1

Yes. The configured restricted commands should behave like this:

  • Not in /sfmode: They do not appear in tab completion, and manually entering them returns the configured “Unknown command” message.

  • While in /sfmode: They appear in tab completion and can be executed.

  • When staff mode is disabled: Their tab-completion entries are removed immediately.

  • Vanish tab completion: Vanished staff names remain hidden from players without katanasfmode.use.

This requires filtering command suggestions based on the sender’s current staff-mode state, rather than only blocking command execution.

lilmiketkhis

And make it where when not in sfmode it doesn’t tab complete the commands in config but when im in sfmode it tab completes

Kodari AI
KodariJul 13 at 12:54 am 3
  • Filter configured command suggestions by the sender’s current staff-mode state.

  • Keep enabled-state command completion available while preserving execution blocking outside staff mode.

Configured commands are now filtered by staff-mode state:

  • Outside /sfmode, restricted commands do not tab-complete.

  • Inside /sfmode, restricted commands tab-complete normally.

  • Restricted command execution remains blocked outside staff mode.

  • Hidden staff-name tab completion remains filtered.

lilmiketkhis

with the command tab-complete if lets say if a command can do command <user> <reason> or command <user> it will tab-complete that also

Kodari AI
KodariJul 13 at 1:14 am 4

Command argument tab completion is now supported while in /sfmode:

  • /ban <user> completes online player names.

  • /ban <user> <reason> completes the <user> argument.

  • Player names are filtered by visibility and partial input.

  • Outside /sfmode, restricted commands and their completions remain hidden.

  • Free-text arguments such as <reason> are left for manual input.

lilmiketkhis

no <reason> will tab-complete the prefilled reason for the command <user> <reason>

Kodari AI
KodariJul 13 at 1:16 am 5
  • Read the current command-completion logic and configuration.

  • Add configured reason suggestions for the final argument while preserving player-name completion and staff-mode restrictions.

  • Add per-command reason lists under staff-mode.command-reasons.

  • Complete player names for the first argument and configured reasons for the second argument.

  • Keep both completion types available only while /sfmode is active.

Configured reason tab completion is now supported:

YAML
staff-mode:
  command-reasons:
    ban:
      - "Griefing"
      - "Advertising"
      - "Harassment"

Examples while in /sfmode:

  • /ban <user> → completes visible player names.

  • /ban <user> <reason> → completes configured reasons such as Griefing.

  • /kick <user> <reason> and /mute <user> <reason> work the same way.

  • Outside /sfmode, restricted commands and all related completions remain hidden.

Add or change reasons under staff-mode.command-reasons.<command> in config.yml.

lilmiketkhis

do /muteoffend and /offend and /ban /mute

📎 1 file 10,829 chars
📄
pasted-code-1783905496827.txt
txt 367 lines
▶
# LiteBans templates.yml generated by version 2.18.6
# https://gitlab.com/ruany/LiteBans/-/wikis/Templates
#
# Each template has the following options:
# reason        | The default reason which will be used if no reason is specified
# message       | The message which the punished player gets when they receive the punishment
# duration      | The amount of time which the punishment will last for (or permanent)
# permission    | The permission which is required (in addition to all other applicable permissions) to use the template, or remove any punishments under this template via /unban, /unmute, /unwarn.
# actions       | A list of commands which will be executed by the player who issued the punishment
# expire_ladder | The duration which punishments will remain on the template ladder and contribute towards ladder progression.
# ip_template   | If enabled, the template ladder will be bound to both the account and the IP address of the players punished through this template.
# Ladders:
# - Each template has its own configurable ladder. Ladders are climbed from the lowest point to the highest point.
# - Ladders must be specified in descending order (from highest to lowest). The final punishment is on the top of the ladder and is listed first.
# - Each ladder step can overwrite template options (reason, message, duration, permission).
# Usage:
# - All templates can be used by their name directly (/ban