Skip to content

Releases: skygamer1233/TimedItem

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

Choose a tag to compare

@skygamer1233 skygamer1233 released this 13 Oct 13:51
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!

1.0.0

Choose a tag to compare

@skygamer1233 skygamer1233 released this 10 Oct 16:04
9cb440a

⏳ TimedItem v1.0.0 — Initial Release

Welcome to the official release of TimedItem v1.0.0! A modern, high-performance, and lag-free expiration item plugin built from the ground up for Minecraft 1.21 / 1.21.1+.

🌟 Key Highlights & Features

  • 🛡️ Dual-State Item System (Inactive vs Active):

    • Inactive State (Hiệu lực: <thời gian> / Duration: <time>): When items are created with /ti add or /ti set, the timer does not start ticking down. Safe to store in Crates, Shops, Kits, or Chests.
    • Creative-Safe: Admins in Creative mode can move, duplicate, or inspect items without triggering the countdown.
    • Smart Survival Activation (Hết hạn vào: <ngày giờ> / Expires at: <date>): The moment an item enters a player's inventory in Survival mode, it automatically transforms into the active expiration date, plays a sound, and begins ticking down!
  • 💤 Standalone Pure-Java NBT Offline Player Scanner:

    • Scans world/playerdata/*.dat files 100% asynchronously (Zero TPS drops / No main-thread lag).
    • Automatically removes expired items from both Player Inventories and Ender Chests even when players are offline.
    • Welcomes returning players with a summary message of expired items.
  • ⚡ 100% Asynchronous & Thread-Safe Engine:

    • Background interval checks run on async threads.
    • World Check: Automatically clears expired dropped items on the ground.
    • Real-Time Event Catchers: Instantly validates items on click, interact, or pickup to prevent using expired items between scheduled scans.
  • 🎨 Native PersistentDataContainer (PDC) & Safe Lore Engine:

    • Stores timestamps directly in PDC for maximum reliability across server restarts.
    • Non-destructive: will never wipe or corrupt existing lore, enchants, MMO attributes, or custom tags from other plugins.
    • Supports standard color codes (&a, &c, etc.) and Hex RGB colors (&#RRGGBB).
  • 🌐 Fully Configurable & Translatable:

    • 100% of messages, prefixes, and /ti help descriptions are editable in lang.yml.
    • Flexible time formats (1d2h, 30m, 1w, 2mo, 1y) and calendar date formats (dd/MM/yyyy HH:mm:ss, dd/MM/yyyy).
    • Full tab-completion support for subcommands and duration parameters.

📥 Installation

  1. Download TimedItem-1.0.0.jar below.
  2. Place it into your server's plugins/ directory.
  3. Start or restart your server (Requires Java 21+ and Minecraft 1.21+).
  4. Customize plugins/TimedItem/config.yml and lang.yml to your liking!