thundernorlis

ผผมอยากสรา้ง Plugin ตัดต้นไม้ครับ เวลาตัดคือ 10 วิ จะตัดในระยะ 10 20 30 บล็อก สามารถเลือกได้ ปรับระยะได้ครับ

Kodari AI
KodariJan 28 at 10:09 am 2,882 (v2)
  • Create a new Minecraft plugin for automated tree cutting with configurable ranges (10, 20, 30 blocks) and a 10-second delay before chopping.

  • Implement main class, event listener for block breaks, scheduler for delay, and config for range settings.

  • Add command to adjust player’s cutting range.

TreeCutterPlugin
A Bukkit/Spigot plugin that automates tree chopping. When a player breaks a log with an axe, after a 10-second delay, it breaks all connected logs within a configurable range (selectable via command: 10, 20, or 30 blocks, adjustable). Includes per-player range settings stored in config, with admin permissions for management.

Project initialized with core functionality for delayed tree cutting and range configuration.

thundernorlis

ขอไม่ให้คำสั่งครับ เป็บระบบ หีบครับ สามารถเ้บไม้ได้ทุชนริด เป็น INVENTORY GUI ไม้ครับ ไม้แต่ละชินเกฏ้บได้สูงสุด 120000ชิ้น

Kodari AI
KodariJan 28 at 10:15 am 16,445 (v2)
  • Analyzed request: Add inventory GUI system for storing all wood types (up to 120,000 per type) integrated with tree cutting; auto-store chopped logs; provide GUI to view/withdraw.

  • Create supporting classes: StorageManager for data handling, WoodStorageCommand for access, and GUI framework classes.

  • Update main plugin class, listener, and plugin.yml for integration; modify listener to auto-store logs instantly without drops.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
14 532
src/main/java/com/treeCutterPlugin/TreeCutterPlugin.java
package com.treeCutterPlugin;

import com.treeCutterPlugin.inventory.gui.GUIManager;
import com.treeCutterPlugin.inventory.gui.GUIListener;
import org.bukkit.plugin.java.JavaPlugin;

public class TreeCutterPlugin extends JavaPlugin {
    private StorageManager storageManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        storageManager = new StorageManager(this);
        guiManager = new GUIManager();
        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getServer().getPluginManager().registerEvents(new TreeCutterListener(this, storageManager), this);
        getCommand("treecutter").setExecutor(new TreeCutterCommand(this));
        getCommand("woodstorage").setExecutor(new WoodStorageCommand(this));
    }

    @Override
    public void onDisable() {
        storageManager.save();
    }

    public StorageManager getStorageManager() {
        return storageManager;
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }
}