Skip to content

⏳ TimedItem v1.1.0 — The MMOItems, Placeholders & Token Update

Latest

Choose a tag to compare

@skygamer1233 skygamer1233 released this 13 Oct 13:51
· 29 commits to main since this release
9cb440a

⏳ TimedItem v1.1.0 — The MMOItems, Placeholders & Token Update! 🎉


🌟 What's New in v1.1.0

1. ⚔️ MMOItems Integration (/ti givemmo)

  • 100% Safe Soft-Dependency: Implemented via safe runtime reflection. No crash or ClassNotFoundException whether MMOItems is installed or not.
  • New Command: /ti givemmo <player> <type> <id> <time> (Permission: timeditem.command.givemmo)
    • Works smoothly from Console (Crates, Quests, WebStore, BattlePass) and in-game.
    • Example: /ti givemmo Steve SWORD CUTLASS 7d
  • Inventory Overflow Protection: If the target player's inventory is full, the item drops naturally at their feet with a notification.
  • Instant Survival Activation: If the recipient is in Survival mode, countdown starts immediately.
  • Dynamic Tab-Completion: Automatically suggests online players, MMOItems Types, and Template Item IDs.

2. 🧩 PlaceholderAPI Hook & Inspect Command (/ti check)

  • Auto-registers expansion %timeditem_...% when PlaceholderAPI is present:
    • %timeditem_hand_is_timed%: true / false
    • %timeditem_hand_status%: active, inactive, expired, none
    • %timeditem_hand_status_formatted%: Localized colored status (§aActive, §eInactive, etc.)
    • %timeditem_hand_remaining%: Human-readable countdown (2d 5h 30m, 45m)
    • %timeditem_hand_remaining_seconds%: Integer seconds left (ideal for DeluxeMenus & conditions)
    • %timeditem_hand_expiry%: Formatted expiration date (25/12/2026 18:30:00)
    • %timeditem_hand_name%: Display name of item in main hand
  • New Command: /ti check (Permission: timeditem.command.check, default: true)
    • Allows any player to view an inspection breakdown of their held timed item.

3. 🎫 Time Extension Tokens (Phiếu Gia Hạn)

  • Introduce consumable tokens that extend the lifespan of timed items!
  • Drag-and-Drop Interaction: Players pick up the token on cursor and click directly onto any valid timed item in their inventory.
  • Deducts 1 token, adds duration, dynamically updates item lore and PDC, and plays level-up / enchantment sound effects.
  • New Command: /ti token <time> [amount] [player] or /ti token <player> <time> [amount] (Permission: timeditem.command.token)
  • Highly Customizable: Customize token material (PAPER), CustomModelData, glow effect, display name, and lore in config.yml.

4. 🌐 Bilingual System (English & Tiếng Việt)

  • Seamlessly toggle between English and Vietnamese via language: "en" or language: "vi" in config.yml.
  • Ships with lang_en.yml and lang_vi.yml.
  • /ti reload instantly refreshes both configs and active language on the fly.

📋 Full Changelog

  • Added: me.timeditem.hook.MMOItemsHook with reflection-based Type/ID discovery.
  • Added: me.timeditem.hook.TimedItemExpansion for PlaceholderAPI integration.
  • Added: Subcommands /ti givemmo, /ti token, /ti check.
  • Added: Extension token PDC tags (extension_token, token_duration).
  • Added: Drag & drop token consumption in PlayerListener#onInventoryClick.
  • Added: Bilingual configs lang_en.yml and lang_vi.yml.
  • Added: token section in config.yml.
  • Improved: Java 21 compilation using --release 21.
  • Updated: Total 10 unit tests passing (100% test coverage for core utilities).

📥 Installation & Updating

  1. Download TimedItem-1.1.0.jar.
  2. Replace the old jar in your plugins/ directory.
  3. Restart server or run /ti reload.
  4. Your existing timed items will remain 100% compatible!