.ofxs

create plugin playtime level with INVENTORY GUI and support hex code small text with lore Claim And can't claim wait tomorrow to claim

Kodari AI
KodariAug 13 at 6:27 am 2
PlaytimeRewards
PlaytimeRewards is a Bukkit plugin that tracks player playtime and rewards them with claimable GUI-based rewards. Players accumulate playtime while online, and when reaching specific milestones, they can open a chest GUI to claim rewards. The GUI displays reward items with hex-color-coded names and lore, showing claim status. Each reward can only be claimed once per day, with a cooldown preventing re-claiming until the next day. The plugin uses a lazy-initialized inventory GUI framework with button-based click handlers, centralized management, and automatic event handling. Rewards are stored per-player with timestamps, and the GUI dynamically updates to show claimed or unclaimed states. The system supports configurable reward tiers based on playtime thresholds, with all data persisted across server restarts.
  1. Create the Gradle project and plugin metadata.

  2. Add persistent playtime tracking, level calculation, and daily reward claiming.

  3. Add the reusable inventory GUI framework and playtime level menu.

  4. Add hex/legacy text formatting, configurable lore, messages, and rewards.

Created the PlaytimeLevels plugin from scratch.

  • /playtime opens an inventory GUI showing configurable playtime levels.

  • Tracks and saves player playtime in data.yml.

  • Supports daily reward claiming with “already claimed, wait until tomorrow” protection.

  • Configurable level requirements, materials, reward commands, lore, titles, and messages.

  • Supports legacy colors (&a) and hex colors (&#55D6FF) in titles, messages, item names, and lore.

  • Includes default levels from 30 minutes through 8 hours.

.ofxs

add level custom Any level can be set up to 200 and add next page and previous page and add command admin can set playtime player how much and The playtime will change according to what is given. example 100d and name INVENTORY GUI &8ᴘʟᴀʏᴛɪᴍᴇ – ᴍᴇɴᴜ and lore required and your playtime use &f and name level use #00fc88 and status red #FF0000 and add Plugins required to run this plugin and author name cherryimut command admin /playtimeadmin and /ptadmin

Kodari AI
KodariAug 13 at 6:46 am 2
  1. Add configurable custom levels (1–200) and paginated playtime GUI navigation.

  2. Add /playtimeadmin and /ptadmin controls for setting player playtime, including formats such as 100d.

  3. Update GUI text/lore, colors, plugin metadata, author, and required-plugin declarations.

  1. Custom levels and pagination: I’ll cap configured level numbers to 1–200, render 28 levels per page, and add in-place previous/next navigation without replacing the active inventory.

  1. Admin playtime control: I’ll add a permission-protected executor accepting /playtimeadmin <player> <duration> (also set form), parse s/m/h/d values such as 100d, persist the exact seconds, and register both requested labels.

  1. GUI presentation and metadata: I’ll apply the requested small-cap title, &f playtime lore, #00fc88 level names, explicit red unavailable statuses, and declare that no external plugin dependency is required while setting author cherryimut. Implemented the Playtime Levels updates.

  • Added support for custom levels 1–200.

  • Added paginated GUI with 28 levels per page.

  • Added previous/next page buttons.

  • Added /playtimeadmin and /ptadmin.

  • Admin command supports:

    • /playtimeadmin <player> <duration>

    • /playtimeadmin set <player> <duration>

    • Duration formats: 30m, 12h, 100d, 3600s

  • Admin playtime changes are saved immediately and affect the player’s current playtime.

  • Updated GUI title to &8ᴘʟᴀʏᴛɪᴍᴇ – ᴍᴇɴᴜ.

  • Updated level names to #00fc88.

  • Required and current playtime lore uses &f.

  • Unavailable and already-claimed statuses use #FF0000.

  • Updated author to cherryimut.

  • Added playtimelevels.admin permission.

  • No external plugins are required.

.ofxs

add level custom Any level can be set up to 200 and add next page and previous page and add command admin can set playtime player how much and The playtime will change according to what is given. example 100d and name INVENTORY GUI &8ᴘʟᴀʏᴛɪᴍᴇ – ᴍᴇɴᴜ and lore required and your playtime use &f and name level use #00fc88 and status red #FF0000 and add Plugins required to run this plugin and author name cherryimut command admin /playtimeadmin and /ptadmin update plugin version to 1.2.1 and plugin Minecraft this version update to 26.2 and kodari plugin bulid

Kodari AI
KodariAug 13 at 6:53 am 1
  1. Update the plugin/build metadata to version 1.2.1, author cherryimut, Minecraft target 26.2, and required-plugin declarations.

  2. Verify the custom 1–200 levels, pagination, admin aliases, duration parsing, and requested GUI text are implemented consistently.

  3. Apply any missing fixes and leave the project ready for Kodari’s build verifier.

Updated the plugin to version 1.2.1.

  • Added Minecraft compatibility target metadata: 26.2.

  • Updated Gradle project version to 1.2.1.

  • Set author to cherryimut.

  • Declared no required or soft-dependent plugins.

  • Custom levels remain configurable from 1 through 200.

  • Added validation to ignore negative playtime requirements.

  • Pagination includes next and previous page buttons.

  • Admin commands remain available:

    • /playtimeadmin <player> <duration>

    • /ptadmin <player> <duration>

    • Supports 100d, 12h, 30m, and seconds.

  • GUI title and requested colors/lore remain configured.

  • Project is ready for the Kodari plugin build verifier.

.ofxs

config.yml add custom level Up to 200 it is optional whether you want to add a level or not.

Kodari AI
KodariAug 13 at 6:54 am 1
  1. Update config.yml with an optional, documented custom-level section supporting level numbers 1–200.

  2. Preserve existing defaults and ensure omitted levels are simply skipped.

Updated config.yml:

  • Added documentation for optional custom levels.

  • Supports any level from 1 to 200.

  • Missing level numbers are skipped automatically.

  • Added commented examples for level 6 and level 200.

  • Existing levels can be edited, removed, or extended.

.ofxs

config.yml add sound and slot All levels are optional kodari plugin bulid

Kodari AI
KodariAug 13 at 6:58 am 1
  1. Add configurable sound and slot fields to each level.

  2. Make level entries fully optional and safely ignore incomplete/invalid entries.

  3. Apply the configured sound on claim and keep slot placement configurable, then leave it ready for the Kodari build verifier.

Updated the plugin for Kodari build verification.

  • Added optional slot and sound settings for each level.

  • Level slots support inventory positions 0–53.

  • Omitted slot values use automatic placement.

  • Omitted or blank sound disables claim sounds.

  • Added sound playback when a reward is successfully claimed.

  • All level entries in config.yml are now optional.

  • Supports custom levels from 1 through 200.

  • Invalid, missing, or incomplete level entries are skipped safely.

  • Added commented examples for level 1 and level 200.

.ofxs

wrong but opsional level before Returned again and level Up to 200 is opsional

Kodari AI
KodariAug 13 at 6:59 am 1
  1. Restore the default playtime levels that were removed.

  2. Keep every level entry optional: levels 1–200 may be edited, removed, or added, and an empty levels section remains valid.

  3. Document the optional custom-level format without forcing all 200 levels to be configured.

Restored the default levels in config.yml.

  • Default levels 1–5 are available again.

  • Any level from 1–200 can be added, edited, or removed.

  • You do not need to configure all 200 levels.

  • Missing level numbers are skipped automatically.

  • Added examples for optional levels 25 and 200.

  • An empty levels: section remains valid.

.ofxs

Ikuti INVENTORY GUI di calender.yml dari deluxemenu yang 15: material: writable_book slot: 31 update: true display_name: '&#FF002Bsᴇɴᴅ ᴛᴏ ᴘʟᴀʏᴇʀ' lore: - '&f▪ Cảm ơn các bạn đã tham gia' - '&f▪ và ủng hộ server mình, hy vọng các' - '&f▪ bạn sẽ tiếp tục chơi và donate để server' - '&f▪ có kinh phí duy trì nhé!' click_commands: - '[sound] ui.button.click'

📎 1 file 1,676 chars
📄
calendar.yml
yml 81 lines
▶
menu_title: "       F3F3Fɴᴇᴡ ʏᴇᴀʀs ᴄᴀʟᴇɴᴅᴀʀ"
open_command:
 - calendar
size: 36
items:

  9:
    material: CHEST
    slot: 12
    update: true
    display_name: '&#FF002Bᴅᴀʏ #1'
    lore: 
      - '&f▪ Click to claim'
    click_commands:
      - '[player] code new1'
      - '[sound] ui.button.click'
  10:
    material: CHEST
    slot: 13
    update: true
    display_name: '&#FF002Bᴅᴀʏ #2'
    lore: 
      - '&f▪ Click to claim'
    click_commands:
      - '[player] code new2'
      - '[sound] ui.button.click'
  11:
    material: CHEST
    slot: 14
    update: true
    display_name: '&#FF002Bᴅᴀʏ #3'
    lore: 
      - '&f▪ Click to claim'
    click_commands:
      - '[player] code new3'
      - '[sound] ui.button.click'

  12:
    material: CHEST
    slot: 21
    update: true
    display_name: '&#FF002Bᴅᴀʏ #4'
    lore: 
      - '&f▪ Click to claim'
    click_commands:
      - '[player] code new4'
      - '[sound] ui.button.click'
  13:
    material: CHEST
    slot: 22
    update: true
    display_name: '&#FF002Bᴅᴀʏ #5'
    lore: 
      - '&f▪ Click to claim'
    click_commands:
      - '[sound] ui.button.click'
  14:
    material: CHEST
    slot: 23
    update: true
    display_name: '&#FF002Bᴅᴀʏ #6'
    lore: 
      - '&f▪ Click to claim'
    click_commands:
      - '[sound] ui.button.click'
  15:
    material: writable_book
    slot: 31
    update: true
    display_name: '&#FF002Bsᴇɴᴅ ᴛᴏ ᴘʟᴀʏᴇʀ'
    lore: 
      - '&f▪ Cảm ơn các bạn đã tham gia'
      - '&f▪ và ủng hộ server mình, hy vọng các'
      - '&f▪ bạn sẽ tiếp tục chơi và donate để server'
      - '&f▪ có kinh phí duy trì nhé!'
    click_commands:
      - '[sound] ui.button.click'



Kodari AI
KodariAug 15 at 5:36 am 1
  1. Menyesuaikan GUI playtime ke pola calendar.yml: ukuran 36 slot, 6 level di slot 12–14 dan 21–23, serta item informasi di slot 31.

  2. Mempertahankan level opsional 1–200, pagination, claim status, lore, dan sound yang sudah dikonfigurasi.

  3. Menambahkan konfigurasi tampilan GUI yang mengikuti format item calendar tanpa mengubah sistem reward/admin yang sudah ada.

[Generation stopped]

.ofxs

15: material: writable_book slot: 31 update: true display_name: '&#FF002Bsᴇɴᴅ ᴛᴏ ᴘʟᴀʏᴇʀ' lore: - '&f▪ Cảm ơn các bạn đã tham gia' - '&f▪ và ủng hộ server mình, hy vọng các' - '&f▪ bạn sẽ tiếp tục chơi và donate để server' - '&f▪ có kinh phí duy trì nhé!' click_commands: - '[sound] ui.button.click'

Kodari AI
KodariAug 15 at 5:36 am 1

The generation was stopped before any content could be produced.

.ofxs

Ikuti INVENTORY GUI di calender.yml dari deluxemenu yang 15: material: writable_book slot: 31 update: true display_name: '&#FF002Bsᴇɴᴅ ᴛᴏ ᴘʟᴀʏᴇʀ' lore: - '&f▪ Cảm ơn các bạn đã tham gia' - '&f▪ và ủng hộ server mình, hy vọng các' - '&f▪ bạn sẽ tiếp tục chơi và donate để server' - '&f▪ có kinh phí duy trì nhé!' click_commands: - '[sound] ui.button.click' lore nya diganti bahasa english dan commands calender jangan ada yang diubah INVENTORY GUI dan ada yang 15

Kodari AI
KodariAug 15 at 5:39 am 1
  1. Menambahkan item GUI nomor 15 pada slot 31 dengan material WRITABLE_BOOK.

  2. Mengikuti format Calendar DeluxeMenus untuk nama, lore bahasa Inggris, dan sound klik.

  3. Tidak mengubah command calendar maupun command level/playtime yang sudah ada.

Ditambahkan ke INVENTORY GUI:

  • Item nomor 15

  • Material: WRITABLE_BOOK

  • Slot: 31

  • update: true

  • Nama: &#FF002Bsᴇɴᴅ ᴛᴏ ᴘʟᴀʏᴇʀ

  • Lore sudah diganti ke bahasa Inggris

  • Klik memainkan sound ui.button.click

  • Slot item 15 dicadangkan agar tidak tertimpa level

  • Command calendar tidak diubah

.ofxs

Material INVENTORY GUI semua level itu chest ya dan lore nya claim tomorrow next day hex code nya #FF0000 dan loading server plugin nya server banner playtime level plugin author cherryimut server information nya server software dipakai server digunakan dan versi software dipake server dan plugin update 1.3.4

Kodari AI
KodariAug 15 at 5:45 am 1
  1. Ubah tampilan semua level menjadi CHEST dan sesuaikan lore status klaim dengan warna hex #FF0000.

  2. Tambahkan informasi plugin/server serta banner Playtime Level dengan author cherryimut.

  3. Naikkan versi plugin ke 1.3.4 dan siapkan build Kodari.

Diperbarui ke versi plugin 1.3.4.

  • Semua item level di INVENTORY GUI sekarang menggunakan material CHEST, termasuk level terkunci.

  • Lore status klaim berubah menjadi:

    • &#FF0000Claim tomorrow (next day)

  • Ditambahkan informasi banner Playtime Level:

    • Plugin: Playtime Level

    • Author: cherryimut

    • Plugin version

    • Server software yang sedang digunakan

    • Versi server yang sedang digunakan

  • Versi Gradle dan plugin.yml sudah menjadi 1.3.4.

  • Konfigurasi level opsional 1–200, pagination, dan item calendar nomor 15 tetap dipertahankan.

.ofxs

Banner itu pas servernya start dan loading muncul yang dikasih tau

Kodari AI
KodariAug 15 at 5:48 am 1
  1. Menambahkan banner startup ke console saat PlaytimeLevels selesai loading.

  2. Menampilkan nama plugin, author, versi plugin 1.3.4, software server, dan versi Minecraft/server.

  3. Tidak mengubah command calendar atau tampilan inventory.

Banner startup sudah ditambahkan. Saat server mulai memuat plugin, console akan menampilkan:

  • Playtime Level has been loaded

  • Author: cherryimut

  • Plugin version: 1.3.4

  • Server software yang digunakan

  • Versi server/Minecraft

  • Garis banner pemisah

Command calendar dan inventory GUI tidak diubah.

.ofxs

Yang INVENTORY GUI claim daily reward itu diganti yang items 15 yang INVENTORY GUI claim daily reward disebelah kiri si book nya dan tambah /ptadmin editor dan muncul INVENTORY GUI nya bisa pindah INVENTORY GUI manapun termasuk daily dan book nya dan tambah /ptadmin help untuk munculin semua command ptadmin

Kodari AI
KodariAug 15 at 6:14 am 2
  1. Ubah layout inventory agar item 15 menjadi book, dengan tombol claim daily reward di sebelah kirinya.

  2. Tambahkan /ptadmin editor untuk membuka editor GUI yang dapat memindahkan item level, daily reward, dan book.

  3. Tambahkan /ptadmin help yang menampilkan seluruh command admin yang tersedia.

  • Claim Daily Reward sekarang berada di slot 30, tepat di sebelah kiri book item 15 di slot 31.

  • Ditambahkan /ptadmin editor.

    • Membuka inventory editor.

    • Item level, daily reward, book, info, previous, dan next dapat dipindahkan ke slot lain.

    • Perubahan posisi tersimpan otomatis ke config.yml saat inventory ditutup.

    • Editor mendukung perpindahan halaman level.

  • Ditambahkan /ptadmin help untuk menampilkan semua command admin:

    • /ptadmin <player> <duration>

    • /ptadmin set <player> <duration>

    • /ptadmin editor

    • /ptadmin help

  • Posisi GUI baru yang dapat dikonfigurasi:

    • gui.info-slot

    • gui.claim-slot

    • gui.previous-slot

    • gui.next-slot

    • gui.items.15.slot

  • Posisi level tetap tersimpan di levels.<level>.slot.

  • Command calendar dan fungsi book tetap tidak diubah.

.ofxs

Dan previous dan next page hex code nya #00F986 plugin update 1.3.6

Kodari AI
KodariAug 15 at 6:14 am 1
  1. Ubah warna tombol Previous Page dan Next Page menjadi #00F986.

  2. Naikkan versi plugin ke 1.3.6 pada metadata dan banner startup.

  • Warna Previous Page dan Next Page diubah menjadi #00F986.

  • Versi plugin diperbarui dari 1.3.4 ke 1.3.6.

  • Diperbarui pada config.yml, plugin.yml, dan build.gradle.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
20 1,555
src/main/java/com/kodari/playtimelevels/PlaytimeLevelsPlugin.java
package com.kodari.playtimelevels;

import com.kodari.playtimelevels.command.PlaytimeCommand;
import com.kodari.playtimelevels.command.PlaytimeAdminCommand;
import com.kodari.playtimelevels.gui.GUIListener;
import com.kodari.playtimelevels.gui.GUIManager;
import com.kodari.playtimelevels.listener.PlaytimeListener;
import com.kodari.playtimelevels.manager.PlaytimeManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class PlaytimeLevelsPlugin extends JavaPlugin {
    private PlaytimeManager playtimeManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        logStartupBanner();

        this.playtimeManager = new PlaytimeManager(this);
        this.guiManager = new GUIManager();

        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlaytimeListener(playtimeManager), this);
        getCommand("playtime").setExecutor(new PlaytimeCommand(this));
        PlaytimeAdminCommand adminCommand = new PlaytimeAdminCommand(this);
        getCommand("playtimeadmin").setExecutor(adminCommand);
        getCommand("ptadmin").setExecutor(adminCommand);

        Bukkit.getScheduler().runTaskTimer(this, playtimeManager::saveOnlineData,
                20L * 60L, 20L * 60L);
    }

    private void logStartupBanner() {
        getLogger().info("========================================");
        getLogger().info("Playtime Level has been loaded");
        getLogger().info("Author: cherryimut");
        getLogger().info("Plugin version: " + getDescription().getVersion());
        getLogger().info("Server software: " + getServer().getName());
        getLogger().info("Server version: " + getServer().getBukkitVersion());
        getLogger().info("========================================");
    }

    @Override
    public void onDisable() {
        if (playtimeManager != null) {
            playtimeManager.saveOnlineData();
        }
    }

    public PlaytimeManager getPlaytimeManager() {
        return playtimeManager;
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }
}