gorilla_125

I want a Minecraft plugin that gives me a timer and also shows every block I have when I use the command /allitems because I want to collect all items and so on at the same time. in the 1.21.11

Kodari AI
KodariApr 24 at 7:42 am 9,927 (v2)

I’ll create an item collection tracker plugin with a timer and GUI system.

ItemCollectorTracker
A comprehensive item collection tracking plugin that monitors every block and item players collect. Features include a persistent timer tracking total playtime, a GUI-based interface accessible via /allitems showing collection progress with visual indicators for collected vs uncollected items, and automatic detection when players obtain new items. Perfect for completionist challenges and tracking collection milestones across all Minecraft materials.

Plugin created! Here’s what you get:

Features:

  • Timer System: Tracks your total playtime in HH:MM:SS format, displayed in the action bar

  • Item Collection Tracking: Automatically detects when you obtain new items (pickup, break blocks, craft)

  • GUI Interface: /allitems command opens a comprehensive GUI showing all collectible items

  • Visual Progress: Collected items show in color with ✓, uncollected items are gray with ✗

  • Statistics: Shows progress percentage, total collected count, and play time

  • Persistent Storage: All data saves automatically and persists across restarts

  • Multi-page Support: Navigation arrows for browsing all items

The GUI displays your collection progress with green checkmarks for collected items and red X’s for items you still need. The timer runs continuously while you’re online and saves automatically every 60 seconds.

gorilla_125

it is so i want that block that i can become in survival when it is in my inventory not when i destroy it

Kodari AI
KodariApr 24 at 7:46 am 4,036 (v2)

I’ll modify the plugin to track items when they’re in your inventory in survival mode, not when you break blocks.

Done! The plugin now tracks items only when they’re in your inventory in survival mode.

Changes:

  • Removed block break and pickup tracking

  • Added an automatic inventory scanner that runs every second (20 ticks)

  • Only scans inventories of players in Survival mode

  • Checks your entire inventory for new items and registers them automatically

  • Properly stops the scanner on plugin disable

Now when you obtain any item and it’s in your inventory while in survival mode, it will be automatically detected and counted toward your collection progress!

gorilla_125

yet i want to install

Kodari AI
KodariApr 24 at 7:47 am 1,633 (v2)

I’ll provide the installation instructions for your plugin:

Installation Instructions

1. Build the plugin:

  • Open terminal/command prompt in the plugin directory

  • Run: ./gradlew build (Linux/Mac) or gradlew.bat build (Windows)

  • Find the JAR file in: build/libs/ItemCollectorTracker-1.0.jar

2. Install on your server:

  • Copy ItemCollectorTracker-1.0.jar to your server’s plugins/ folder

  • Restart your server

3. Files created:

  • plugins/ItemCollectorTracker/config.yml - Configuration file

  • plugins/ItemCollectorTracker/playerdata/ - Player data storage

4. Usage:

  • Join the server in Survival mode

  • Collect items - they’ll be tracked when in your inventory

  • Use /allitems to view your collection progress

  • Your timer shows in the action bar

Requirements:

  • Spigot/Paper 1.21+ server

  • Java 21+

Commands:

  • /allitems - Opens the collection tracking GUI

Permissions:

  • itemtracker.allitems - Access to /allitems command (default: everyone)

The plugin will automatically start tracking items when they appear in your inventory while in survival mode!

gorilla_125

noo i want to install that that you made

Kodari AI
KodariApr 24 at 7:47 am 1,897 (v2)

Ah, you want to install the plugin I just created! Here’s how:

Step-by-Step Installation:

1. Build the Plugin:

Open a terminal/command prompt in your project folder and run:

Shell
# On Windows:
gradlew.bat build

# On Linux/Mac:
./gradlew build

2. Find the JAR file:

After building, you’ll find the plugin file at:

Plain Text
build/libs/ItemCollectorTracker-1.0.jar

3. Install on Server:

  • Copy ItemCollectorTracker-1.0.jar to your Minecraft server’s plugins/ folder

  • Restart your server (or use /reload confirm but restart is safer)

4. Verify Installation:

When the server starts, you should see:

Plain Text
[ItemCollectorTracker] ItemCollectorTracker v1.0 has been enabled!

5. Start Using:

  • Join the server in Survival mode

  • Collect any items (they must be in your inventory)

  • Type /allitems to open the collection GUI

  • Your playtime timer appears in the action bar

Files Created:

  • plugins/ItemCollectorTracker/config.yml

  • plugins/ItemCollectorTracker/playerdata/<uuid>.yml (your collection data)

That’s it! The plugin is ready to track your item collection journey! 🎮

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
15 809
src/main/java/com/itemtracker/ItemCollectorPlugin.java
package com.itemtracker;

import com.itemtracker.commands.AllItemsCommand;
import com.itemtracker.data.DataManager;
import com.itemtracker.inventory.gui.GUIListener;
import com.itemtracker.inventory.gui.GUIManager;
import com.itemtracker.listeners.CollectionListener;
import com.itemtracker.timer.TimerManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class ItemCollectorPlugin extends JavaPlugin {
    
    private DataManager dataManager;
    private TimerManager timerManager;
    private GUIManager guiManager;
    private CollectionListener collectionListener;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.dataManager = new DataManager(this);
        this.timerManager = new TimerManager(this);
        this.guiManager = new GUIManager();
        
        getCommand("allitems").setExecutor(new AllItemsCommand(this));
        
        this.collectionListener = new CollectionListener(this);
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(collectionListener, this);
        
        this.timerManager.start();
        
        getLogger().info("ItemCollectorTracker enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.collectionListener != null) {
            this.collectionListener.stopScanner();
        }
        
        if (this.timerManager != null) {
            this.timerManager.stop();
        }
        
        if (this.dataManager != null) {
            this.dataManager.saveAllData();
        }
        
        getLogger().info("ItemCollectorTracker disabled!");
    }
    
    public String getMessage(String path) {
        String prefix = getConfig().getString("messages.prefix", "");
        String message = getConfig().getString("messages." + path, path);
        return colorize(prefix + " " + message);
    }
    
    public String colorize(String text) {
        return text.replace("&", "§");
    }
}