Skip to content

sheduxdev/ExtraPlaceholders

Repository files navigation

ExtraPlaceholders

License Java Minecraft

A powerful PlaceholderAPI expansion that provides custom placeholders for Bolt and Phoenix plugins.

📋 Requirements

  • Minecraft: 1.13 or higher (Paper/Spigot)
  • Java: 21+
  • PlaceholderAPI: Required (core dependency)
  • Bolt: Optional (for match & kit placeholders)
  • Phoenix: Optional (for staff mode placeholders)

🚀 Features

  • Server Information: Customizable date formats with multi-locale support
  • Match Management: Real-time match winner/loser tracking for solo, team, and FFA matches
  • Kit Information: Dynamic kit rule checking for any Bolt kit
  • Staff Tools: Vanish and mod-mode status indicators
  • Rank Expiration: Configurable rank expiration time display with cascading time units
  • Performance: Optimized code with minimal overhead
  • Flexible: Works with or without optional dependencies

📦 Installation

  1. Download the latest release from Releases
  2. Place the .jar file in your plugins/ folder
  3. Ensure PlaceholderAPI is installed
  4. (Optional) Install Bolt and/or Phoenix
  5. Restart your server
  6. Configure the plugin in plugins/ExtraPlaceholders/config.yml

📖 Available Placeholders

Server Placeholders

Placeholder Example Result Description
%extraplaceholders_server_date% 15 January 2024, Sun Current date with default locale
%extraplaceholders_server_date_<locale>% 15 Ocak 2024, Paz Current date with specific locale

Supported Locales: tr, en, en-us, en-gb, de, fr, es, it, pt, pt-br, ru, ja, zh, zh-cn, zh-tw, ar, ko, nl, pl, sv, no, da, fi

Bolt Placeholders (Requires Bolt)

Match Information

Placeholder Example Result Description
%extraplaceholders_bolt_match_winner% PlayerName Winner(s) of the current match
%extraplaceholders_bolt_match_loser% PlayerName Loser(s) of the current match

Current Kit Rules

Placeholder Example Result Description
%extraplaceholders_bolt_kit_rule_<rule>% true / false Check if current kit has a specific rule enabled

Specific Kit Rules

Placeholder Example Result Description
%extraplaceholders_bolt_kit_<kitname>_rule_<rule>% true / false Check if a specific kit has a rule enabled

Available Rules:

  • Gameplay: enabled, ranked, build, showhp, editable, ffa
  • Game Modes: spleef, sumo, combo, boxing, bridges, bedfight, mlgrush, battlerush, fireballfight, pearlfight, stickfight, crystalpvp, cartpvp, tntsumo, oitq
  • Combat: legacycombat, nodrop, nofall, nohunger, noregen, pearldamage, pearlcooldown
  • Mechanics: blockremoval, respawnmode, buildheightdamage, voidspawn, liquidkill, portal, windchargemode, presplash, breakmap
  • Party: partyffa, partysplit, stickspawn
  • Special: topfight, windchargemode

Phoenix Placeholders (Requires Phoenix)

Placeholder Example Result Description
%extraplaceholders_phoenix_status% [⚗] [⚙] Shows staff status (vanish/mod mode)
%extraplaceholders_phoenix_expiration% 1 Year 5 Days 3 Hours Shows rank expiration time with configurable units

Rank Expiration Features

  • Cascading Time Units: Disabled units automatically convert to the next available unit
    • Example: With YEAR: false and MONTH: false, "1 year 5 days" becomes "370 Days"
  • Fully Configurable: Enable/disable any time unit (Years, Months, Days, Hours, Minutes, Seconds)
  • Custom Labels: Customize singular and plural forms for each time unit
  • Smart Display: Only shows non-zero values for cleaner output
  • Permanent Rank Support: Configurable message for permanent ranks

🎨 Configuration

Default Configuration

MESSAGES:
  # Reload Messages
  RELOAD_SUCCESS: '&aConfiguration successfully reloaded in &e<duration>ms&a!'
  RELOAD_ERROR: '&cAn error occurred while reloading the configuration!'
  
  # Plugin Status Messages
  PLUGIN_ENABLED: '&aPlugin successfully enabled! &7v<version>'
  PLUGIN_DISABLED: '&cPlugin disabled.'
  EXPANSION_REGISTERED: '&aPlaceholderAPI integration completed successfully.'
  EXPANSION_FAILED: '&cPlaceholderAPI registration failed!'
  
  # Dependency Messages
  PLACEHOLDER_API_NOT_FOUND: '&cPlaceholderAPI not found! Plugin will be disabled.'
  BOLT_NOT_AVAILABLE: '&cBolt API is not available'
  PHOENIX_NOT_AVAILABLE: '&cPhoenix API is not available'
  
  # Kit Placeholder Messages
  KIT_OUT_OF_MATCH: '&7Out of match'
  KIT_LOADING: '&eKit loading'
  KIT_INVALID: '&cInvalid kit'
  KIT_DEFAULT: '&7-'
  
  # Date Placeholder Messages
  INVALID_LOCALE: '&cInvalid locale format!'

DATE:
  # Available locales: tr, en, de, fr, es, it, pt, ru, ja, zh, ar, ko, nl, pl, sv, no, da, fi
  # Format pattern: d MMMM yyyy, EEE
  DEFAULT_LOCALE: 'tr-TR'
  DATE_PATTERN: 'd MMMM yyyy, EEE'

PHOENIX:
  # Phoenix Status Prefixes
  DEFAULT_STATUS: '&f'
  VANISHED_PREFIX: '<#9e9e9e>[⚗] '
  MOD_MODE_PREFIX: '<#ffc430>[⚙] '
  
  # Rank Expiration Messages
  PERMANENT_RANK: '&aPermanent'
  NO_TIME_REMAINING: '&c0s'
  
  RANK_EXPIRY:
    # Time Unit Configuration
    # Set to false to cascade that unit into the next available unit
    # Example: If YEAR and MONTH are false, a '1 year 5 days' rank becomes '370 days'
    # Cascading order: Years -> Months -> Days -> Hours -> Minutes -> Seconds
    YEAR: true
    MONTH: true
    DAY: true
    HOUR: true
    MINUTES: true
    SECONDS: true
    
    # Singular Time Unit Labels
    YEAR_SINGULAR: ' Year'
    MONTH_SINGULAR: ' Month'
    DAY_SINGULAR: ' Day'
    HOUR_SINGULAR: ' Hour'
    MINUTE_SINGULAR: ' Minute'
    SECOND_SINGULAR: ' Second'
    
    # Plural Time Unit Labels
    YEAR_PLURAL: ' Years'
    MONTH_PLURAL: ' Months'
    DAY_PLURAL: ' Days'
    HOUR_PLURAL: ' Hours'
    MINUTE_PLURAL: ' Minutes'
    SECOND_PLURAL: ' Seconds'

LOGGER:
  # Logger Format Settings
  PREFIX: '&8[&6<plugin>&8]'
  INFO_COLOR: '&b'
  SUCCESS_COLOR: '&a'
  ERROR_COLOR: '&c'

Rank Expiration Configuration Examples

Example 1: Full Time Display (Default)

RANK_EXPIRY:
  YEAR: true
  MONTH: true
  DAY: true
  HOUR: true
  MINUTES: true
  SECONDS: true

Result: 1 Year 2 Months 5 Days 3 Hours 30 Minutes 15 Seconds

Example 2: Days and Hours Only

RANK_EXPIRY:
  YEAR: false
  MONTH: false
  DAY: true
  HOUR: true
  MINUTES: false
  SECONDS: false

For "1 year 2 months 5 days 3 hours"
Result: 430 Days 3 Hours (365 + 60 + 5 = 430 days)

Example 3: Total Hours Display

RANK_EXPIRY:
  YEAR: false
  MONTH: false
  DAY: false
  HOUR: true
  MINUTES: true
  SECONDS: false

For "5 days 3 hours 30 minutes"
Result: 123 Hours 30 Minutes (5×24 + 3 = 123 hours)

Example 4: Compact Display

RANK_EXPIRY:
  YEAR: true
  MONTH: true
  DAY: true
  HOUR: false
  MINUTES: false
  SECONDS: false

Result: 1 Year 2 Months 5 Days

Color Support

The plugin supports both legacy color codes (&a, &c) and modern hex colors:

  • Hex Colors: <#RRGGBB> (e.g., <#FF5733>)
  • Gradients: <gradient:#START:#END>text</gradient>

🎯 Usage Examples

Chat Format

# Using Phoenix status in chat format
prefix: "%extraplaceholders_phoenix_status% &ePlayerName"
# Result: [⚗] [⚙] PlayerName (if vanished and in mod mode)

Scoreboard

scoreboard:
  lines:
    - "&8&m--------------------"
    - "&eDate: &f%extraplaceholders_server_date%"
    - "&eRanked: &f%extraplaceholders_bolt_kit_rule_ranked%"
    - "&eMatch Winner: &f%extraplaceholders_bolt_match_winner%"
    - "&eRank Expires: &f%extraplaceholders_phoenix_expiration%"
    - "&8&m--------------------"

TAB Plugin

header:
  - "&6&lMY SERVER"
  - "&7%extraplaceholders_server_date%"
  - ""
  - "&eStatus: %extraplaceholders_phoenix_status%"
  - "&eRank: &f%extraplaceholders_phoenix_expiration%"

Chat Reaction Plugin

placeholders:
  - placeholder: "%extraplaceholders_bolt_kit_rule_sumo%"
    value: "true"
    reaction: "This is a sumo kit!"

Rank Expiration Display

# In TAB, scoreboard, or any placeholder-supported plugin
player_info:
  - "&eYour rank expires in:"
  - "&f%extraplaceholders_phoenix_expiration%"

🔧 Commands

Command Permission Description
/extraplaceholders extraplaceholders.admin Main command
/extraplaceholders reload extraplaceholders.admin Reload configuration
/extraplaceholders info extraplaceholders.admin Show plugin information

Aliases: /ep

🗃️ Building from Source

Prerequisites

  • Java Development Kit (JDK) 21+
  • Git

Build Steps

# Clone the repository
git clone https://github.com/sheduxdev/ExtraPlaceholders.git
cd ExtraPlaceholders

# Build with Gradle (Windows)
gradlew.bat shadowJar

# Build with Gradle (Linux/Mac)
./gradlew shadowJar

# Output: build/libs/ExtraPlaceholders-v0.1.jar

🔗 Dependencies

Required

Optional

Build Dependencies

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

sheduxdev

🙏 Acknowledgments


About

A powerful PlaceholderAPI expansion that provides custom placeholders for Bolt and Phoenix plugins.

Resources

License

Stars

Watchers

Forks

Packages

No packages published