PhantomControl icon

PhantomControl -----

PhantomControl is a powerful Minecraft server plugin for managing the spawning of players' phantoms,



PhantomControl v2​

PhantomControl is a powerful Minecraft server plugin for managing player phantom spawning, compatible with Folia, Paper, and Spigot servers.
Background
In Minecraft, phantoms are hostile mobs that spawn at night and attack players who haven't slept for a long time. Frequent phantom attacks often disrupt normal gameplay, especially for players focused on long-term tasks like building. However, if the server disables all phantoms entirely, it deprives players who need phantoms of their gaming experience.
To balance these two needs — allowing players to choose whether to enable phantoms themselves — I developed this plugin. It allows players to control phantom spawning according to their preferences, while supporting admin global management.
If you have any suggestions or issues, feel free to let me know!
Features
  • Phantom Spawning Control: Allow players to enable or disable their own phantom spawning
  • Admin Commands: Support admins managing other players' phantom settings, including batch operations
  • Database Support: Supports both FlatFile and MySQL database storage
  • HikariCP Connection Pool: Automatic HikariCP loading via Paper Libraries, no manual installation needed
  • Folia Compatible: Full Folia support with automatic environment detection and optimized scheduling
  • World Whitelist/Blacklist: Configure specific worlds for phantom control
  • Auto-Save Mechanism: Periodic auto-save of player data, ensuring data security
  • Config Hot Reload: Support dynamic config reloading without server restart
  • Complete Permission System: Fine-grained permission control
  • Multi-language Support: Supports Chinese and English, auto-adjusts based on player client language
  • GUI Interface: Provides graphical control interface for easy player operation
  • PlaceholderAPI Support: Provides placeholders for other plugins to use
  • Developer API: Provides custom Event for other plugins to listen for status changes
  • bStats Integration: Plugin usage statistics, can be enabled/disabled in config
  • Debug Mode: Configurable detailed log output for troubleshooting
  • Config Validation: Automatically validates config file integrity, safely disables plugin on config errors
Installation
  1. Download the latest version of PhantomControl.jar
  2. Place the jar file in your server's plugins folder
  3. Restart the server, the plugin will automatically generate config files
  4. Modify config as needed, then use /phantomreload command to reload
Paper users: The plugin automatically downloads HikariCP and MySQL drivers via Paper Libraries. No manual installation needed.
Configuration
The plugin generates config files at plugins/PhantomControl/config.yml.
Database Settings
Code (Text):
database:
  type: "flatfile" # Database type: flatfile, mysql
  auto-save-interval: 300 # Auto-save interval (seconds), 0 = disabled
  cache-timeout-minutes: 60 # Cache expiry (minutes), auto-cleanup and save on timeout
  mysql:
    address: "localhost:3306" # MySQL address
    username: "username" # MySQL username
    password: "password" # MySQL password
    database: "phantom_control" # Database name
    prefix: "phc_" # Table prefix
World Whitelist/Blacklist
Code (Text):
whitelist:
  world-whitelist-enabled: false # Enable world whitelist
  world-blacklist-enabled: true # Enable world blacklist
  world-whitelist: [] # Whitelist worlds
  world-blacklist: [] # Blacklist worlds
Message & Language Settings
Code (Text):
settings:
  message:
    default-type: "CHAT" # Default message display type: CHAT, ACTION_BAR, TITLE
    show-title-on-change: false # Show title message on status change
    show-actionbar-on-change: false # Show ActionBar message on status change
    language:
      mode: "auto" # Language mode: auto, chinese, english
      default: "messages_en" # Default language file name (without .yml)
  bstats:
    enabled: true # Enable bStats statistics
GUI Settings
Code (Text):
settings:
  gui:
    status-enabled-material: "GREEN_WOOL" # Enabled status block material
    status-disabled-material: "RED_WOOL" # Disabled status block material
    enable-button-material: "LIME_DYE" # Enable button material
    disable-button-material: "RED_DYE" # Disable button material
    info-button-material: "BOOK" # Info button material
    border-material: "GRAY_STAINED_GLASS_PANE" # Border material
Command Settings
Code (Text):
settings:
  commands:
    main-command: "phantomcontrol" # Main command name
    main-aliases: ["pc", "phantom"] # Main command aliases
    reload-command: "phantomcontrolreload" # Reload command name
    reload-aliases: ["pcr", "phreload"] # Reload command aliases
Debug Mode
Code (Text):
settings:
  debug:
    enabled: false # Enable debug mode (shows detailed logs when enabled)
Message Configuration
Message configuration has been moved to messages.yml, supports multi-language settings.
Commands
Main command aliases: /phantomcontrol, /pc, /phantom
Player Commands
Command Description Permission
/phantomcontrol enable (or on) Enable phantom spawning None
/phantomcontrol disable (or off) Disable phantom spawning None
/phantomcontrol status (or check) Check current phantom status None
/phantomcontrol gui (or menu) Open graphical control interface None
/phantomcontrol help Show help information None

Admin Commands
Command Description Permission
/phantomcontrol admin enable <player> Enable phantoms for specified player phantomcontrol.admin
/phantomcontrol admin disable <player> Disable phantoms for specified player phantomcontrol.admin
/phantomcontrol admin status <player> Check specified player's phantom status phantomcontrol.admin
/phantomcontrol admin batch enable <player1> <player2> ... Batch enable phantoms for multiple players phantomcontrol.admin
/phantomcontrol admin batch disable <player1> <player2> ... Batch disable phantoms for multiple players phantomcontrol.admin
/phantomcontrol admin server View server phantom settings statistics phantomcontrol.admin
/phantomreload (or pcr, phreload) Reload plugin config phantomcontrol.reload

Permissions
Permission Description Default
phantomcontrol.use Allow usage of basic phantom control commands All players
phantomcontrol.admin Allow usage of admin commands to manage other players OP
phantomcontrol.reload Allow reloading plugin config OP

PlaceholderAPI Support
PhantomControl supports PlaceholderAPI. Note: PlaceholderAPI version 2.11.7+ supports Folia.
Placeholder Description Example Output
%phantomcontrol_enabled% Returns boolean value of whether player's phantoms are enabled true or false
%phantomcontrol_status% Returns text of player's phantom status Enabled or Disabled

Developer API
PhantomControl v2 provides a custom Event for other plugins to listen for phantom status changes.
Code (Text):
import yyz.chl.phantomcontrol.event.PhantomStatusChangeEvent;
@EventHandler
public void onPhantomChange(PhantomStatusChangeEvent event) {
    Player player = event.getPlayer();
    boolean nowEnabled = event.isEnabled();
    getLogger().info(player.getName() + " phantoms: " + (nowEnabled ? "enabled" : "disabled"));
    // Integration logic here
}
API Description
PhantomStatusChangeEvent Fired when a player's phantom status changes, contains the player object and current state

FAQ
Q: Which server versions does this plugin support?
A: The plugin supports Minecraft 1.18+ versions, including Spigot, Paper, and Folia servers.
Q: Why are phantoms still spawning after a player disables them?
A: Please check:
  1. Whether the player's world is in the whitelist/blacklist
  2. Whether the plugin has sufficient permissions
  3. Whether other plugins on the server affect phantom spawning
Q: How can I view a player's TIME_SINCE_REST statistic?
A: In-game, press ESC → Statistics, look for "Time Since Last Rest".
Q: Which languages does the plugin support?
A: The plugin supports Chinese and English, auto-adjusts based on player client language. Can also force a specific language in config.
Q: How do I control bStats statistics?
A: You can enable/disable bStats in settings.bstats.enabled in the config file.
Q: How to enable debug mode?
A: Set settings.debug.enabled to true in config.yml, then restart the server or reload the plugin to view detailed logs in the console.
Q: Do I need to install MySQL driver manually?
A: For Paper servers, the plugin automatically loads HikariCP and MySQL drivers via Paper Libraries. For other servers, you need to download them manually into the plugins folder.
Developer Info
Feel free to submit Issues and Pull Requests to help improve the plugin!
bStats Page
[​IMG]
Statistics update every 30 minutes. Data source: bStats.org
Contact
  • If you have any questions or suggestions, please leave a comment on the platform where I posted this plugin
  • QQ Group: 1093090518
  • Or contact via QQ: 2919089965
[HR]
Thank you for using PhantomControl! If you have any questions, feel free to contact me.
Resource Information
Author:
----------
Total Downloads: 89
First Release: Feb 4, 2026
Last Update: May 15, 2026
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings