mahmut2009

https://builtbybit.com/resources/donutorder-localization-performance.56950/field?field=dependencies bu pl yi kodlaya bilirmisin 1.20.4 aynı özellikler olacak şekilde

Kodari AI
KodariJan 11 at 12:37 pm 17,506 (v2)

DonutOrder eklentisini aynı özelliklerle kodlayacağım. Önce dokümantasyonu okuyup özelliklerini öğreneyim.

Şimdi DonutOrder eklentisini aynı özelliklerle oluşturacağım. Bu bir sipariş sistemi eklentisi - oyuncular item siparişi oluşturabilir, diğer oyuncular bu siparişleri teslim edip para kazanabilir.

DonutOrder
A comprehensive order management system where players can create item orders with custom prices and durations. Other players can deliver requested items to earn money. Features include economy integration, shop plugin price syncing, order expiration system, GUI-based order browsing, delivery tracking, and extensive API for third-party integrations. Supports multiple currency and shop plugins through hook system.

Plan:

  • API package structure (currency, shop, events, util)

  • Core managers (CurrencyManager, ShopManager, OrderManager)

  • Order data model with expiration tracking

  • GUI system for browsing/creating/delivering orders

  • Commands and tab completion

  • Configuration and localization

  • Built-in Vault currency hook

DonutOrder eklentisi başarıyla oluşturuldu! Tüm özellikler API dokümantasyonuna uygun şekilde kodlandı:

Temel Özellikler:

  • Oyuncular item siparişi oluşturabilir (miktar, fiyat, süre)

  • Diğer oyuncular siparişleri teslim edip para kazanabilir

  • Otomatik sipariş sona erme sistemi

  • GUI tabanlı sipariş görüntüleme ve teslim etme

  • Economy entegrasyonu (Vault)

  • Shop plugin fiyat senkronizasyonu desteği

API Sistemi:

  • CurrencyHook ve CurrencyManager (ekonomi entegrasyonu)

  • ShopHook ve ShopManager (shop plugin entegrasyonu)

  • 5 farklı event (OrderExpiration, PlayerOrderDelivery, PlayerOrderItem, PlayerQueryItem, CurrencyRegistration, ShopRegistration)

  • Order sınıfı (tüm sipariş yönetimi)

Komutlar:

  • /order create <miktar> <fiyat> [süre] - Sipariş oluştur

  • /order list - Aktif siparişleri görüntüle

  • /order my - Kendi siparişlerini görüntüle

  • /order reload - Config yenile

  • /order syncprices - Shop fiyatlarını senkronize et

  • /order delete <id> - Sipariş sil

mahmut2009

bunu türkçeleştirebilirmisin

Kodari AI
KodariJan 11 at 12:39 pm 15,265 (v2)

Projeyi Türkçeleştirmek için önce mevcut mesajları inceleyeceğim.

Projeyi Türkçeleştiriyorum:

Proje başarıyla Türkçeleştirildi. Tüm mesajlar, komutlar ve GUI başlıkları Türkçe’ye çevrildi.

mahmut2009

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 6 error(s):

ERROR in src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java at line 62: cannot find symbol
        if (item == null) return new ItemStack(org.bukkit.Material.WOOL, 1, (short) 5);
                                                                  ^
  symbol: variable WOOL
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java at line 79: cannot find symbol
        if (item == null) return new ItemStack(org.bukkit.Material.WOOL, 1, (short) 5);
                                                                  ^
  symbol: variable WOOL
  location: class Material

ERROR in   src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java at line 62: cannot find symbol
          if (item == null) return new ItemStack(org.bukkit.Material.WOOL, 1, (short) 5);
                                                                    ^
  symbol: variable WOOL
  location: class Material

ERROR in   src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java at line 79: cannot find symbol
          if (item == null) return new ItemStack(org.bukkit.Material.WOOL, 1, (short) 5);
                                                                    ^
  symbol: variable WOOL
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java at line 62: cannot find symbol
        if (item == null) return new ItemStack(org.bukkit.Material.WOOL, 1, (short) 5);
                                                                  ^
  symbol: variable WOOL
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java at line 79: cannot find symbol
        if (item == null) return new ItemStack(org.bukkit.Material.WOOL, 1, (short) 5);
                                                                  ^
  symbol: variable WOOL
  location: class Material


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java
  -   src/main/java/me/serbob/donutorder/INVENTORY GUI/OrderDeliveryGUI.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJan 11 at 12:40 pm 8,910 (v2)

I need to read the file with the compilation error to fix the cross-version compatibility issue with Material.WOOL.

Analysis

The error is in OrderDeliveryGUI.java at lines 62 and 79 where it’s using org.bukkit.Material.WOOL as a fallback. Material.WOOL doesn’t exist in modern Minecraft versions (1.13+). The code is already using XMaterial correctly, but the fallback is broken.

Fix

Replace the fallback with XMaterial’s cross-version compatible approach:

Fixed the cross-version compatibility issue by replacing the broken Material.WOOL fallback with XMaterial’s matchXMaterial() approach that properly handles all Minecraft versions.

mahmut2009

silme işlemini INVENTORY GUI den yapalım ve komutları biraz daha mantıksal şekilde olsun sil işleminide id ile değilde guiden yapalım INVENTORY GUI ye de güzel şeyler getir kategori falan arama yeri ileri sayfa geri sayfa gibi güzel şeyler

Kodari AI
KodariJan 11 at 12:48 pm 27,805 (v2)

Harika! DonutOrder plugini için modern bir Inventory GUI sistemi yapıyorum. Önce mevcut yapıyı inceleyeyim:

Plan:

  • Modern GUI framework oluştur (InventoryHandler, InventoryButton, InventoryGUI, GUIManager, GUIListener)

  • OrderListGUI’yi yeniden yaz (sayfalama, arama, kategori filtreleme, sıralama)

  • OrderManagementGUI ekle (sipariş silme, düzenleme, detaylar)

  • Komutları basitleştir (GUI odaklı)

  • Eski GUIListener’ı kaldır

Modern GUI sistemi tamamlandı! İşte yaptığım değişiklikler:

✅ Yeni Özellikler

Modern GUI Framework:

  • Event-driven mimari (InventoryHandler, InventoryButton, InventoryGUI)

  • GUIManager ile merkezi yönetim

  • Lazy initialization ile performans optimizasyonu

OrderListGUI - Gelişmiş Sipariş Listesi:

  • 📊 Filtreler: Tümü, Siparişlerim, Aktif, Tamamlanan, Süresi Yakında Dolan

  • 🔄 Sıralama: En Yeni, En Eski, Fiyat (Yüksek/Düşük), Miktar (Yüksek/Düşük)

  • ◀️▶️ Sayfalama: İleri/geri sayfa navigasyonu

  • 📖 Bilgi Paneli: Toplam sipariş, sayfa, filtre ve sıralama bilgisi

  • 🔧 Admin Paneli: Yönetim GUI’sine hızlı erişim

OrderDeliveryGUI - Teslim Ekranı:

  • Hızlı teslim butonları (1, 16, 32, 64)

  • Tümünü teslim et

  • Envanterdeki tümünü teslim et

  • Geri dön butonu

OrderManagementGUI - Yönetim Paneli:

  • Sol tık: Detayları görüntüle

  • Sağ tık: Siparişi sil

  • Sayfalama desteği

OrderDetailGUI - Detaylı Bilgi:

  • Genel bilgiler, istatistikler, zaman bilgileri

  • Oluşturan oyuncu bilgisi

  • Admin: Sipariş silme

  • Admin: İptal et ve iade et

Basitleştirilmiş Komutlar:

  • /order - Direkt GUI açar

  • /order liste - Tüm siparişler

  • /order benim - Kendi siparişlerim

  • /order olustur - Sipariş oluştur

  • Silme işlemi artık sadece GUI’den

mahmut2009

bide pluginde orderı açınca ordaki eşyaları envanterimize alabiliyoruz

Kodari AI
KodariJan 11 at 12:54 pm 11,627 (v2)

Analiz ediyorum:

Sorun: InventoryGUI.java içindeki onClick metodu her tıklamayı iptal ediyor (event.setCancelled(true)), bu da oyuncuların GUI’deki eşyaları envanterlerine almasına izin veriyor.

Çözüm: event.setCancelled(true) satırını kaldırıp, sadece buton slotlarındaki tıklamaları iptal etmeliyiz. Ayrıca oyuncunun kendi envanterine tıklamasını da engellemeliyiz.

Yapılan değişiklikler:

  • GUI envanterine tıklamalar tamamen iptal ediliyor (eşyalar alınamıyor)

  • Oyuncunun kendi envanterine shift+tıklama iptal ediliyor (eşyalar GUI’ye taşınamıyor)

  • Normal envanter tıklamaları serbest (oyuncu kendi envanterinde eşya taşıyabilir)

mahmut2009

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 9 error(s):

ERROR in src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java at line 164: cannot find symbol
        if (item == null) item = new ItemStack(Material.WATCH);
                                                       ^
  symbol: variable WATCH
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java at line 198: cannot find symbol
        if (item == null) item = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
                                                       ^
  symbol: variable SKULL_ITEM
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/inventory/impl/OrderDeliveryGUI.java at line 121: cannot find symbol
        if (item == null) item = new ItemStack(Material.WOOL, 1, (short) 5);
                                                       ^
  symbol: variable WOOL
  location: class Material

ERROR in   src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java at line 164: cannot find symbol
          if (item == null) item = new ItemStack(Material.WATCH);
                                                         ^
  symbol: variable WATCH
  location: class Material

ERROR in   src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java at line 198: cannot find symbol
          if (item == null) item = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
                                                         ^
  symbol: variable SKULL_ITEM
  location: class Material

ERROR in   src/main/java/me/serbob/donutorder/inventory/impl/OrderDeliveryGUI.java at line 121: cannot find symbol
          if (item == null) item = new ItemStack(Material.WOOL, 1, (short) 5);
                                                         ^
  symbol: variable WOOL
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java at line 164: cannot find symbol
        if (item == null) item = new ItemStack(Material.WATCH);
                                                       ^
  symbol: variable WATCH
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java at line 198: cannot find symbol
        if (item == null) item = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
                                                       ^
  symbol: variable SKULL_ITEM
  location: class Material

ERROR in src/main/java/me/serbob/donutorder/inventory/impl/OrderDeliveryGUI.java at line 121: cannot find symbol
        if (item == null) item = new ItemStack(Material.WOOL, 1, (short) 5);
                                                       ^
  symbol: variable WOOL
  location: class Material


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java
  - src/main/java/me/serbob/donutorder/inventory/impl/OrderDeliveryGUI.java
  -   src/main/java/me/serbob/donutorder/inventory/impl/OrderDetailGUI.java
  -   src/main/java/me/serbob/donutorder/inventory/impl/OrderDeliveryGUI.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJan 11 at 1:01 pm 15,836 (v2)

I need to read the files with compilation errors to fix the XSeries material usage.

Analysis

The errors are caused by using legacy Material names that don’t exist in newer Minecraft versions:

  • Material.WATCH → should use XMaterial.CLOCK

  • Material.SKULL_ITEM → should use XMaterial.PLAYER_HEAD

  • Material.WOOL → should use XMaterial.LIME_WOOL

The fallback code is using old Material constants instead of proper XMaterial parsing.

Fix

I’ll update both files to properly use XMaterial without legacy fallbacks:

Fixed the compilation errors by removing legacy Material fallbacks and using XMaterial.parseItem() directly, which handles cross-version compatibility automatically.

mahmut2009

order eklenince en başa gelsin ve teslim edince direk silinsin şuan menüyü kapa aç yapınca siliniyor

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
30 2,320
src/main/java/me/serbob/donutorder/DonutOrder.java
package me.serbob.donutorder;

import lombok.Getter;
import me.serbob.donutorder.api.currency.CurrencyManager;
import me.serbob.donutorder.api.event.CurrencyRegistrationCompleteEvent;
import me.serbob.donutorder.api.event.ShopRegistrationCompleteEvent;
import me.serbob.donutorder.api.shop.ShopManager;
import me.serbob.donutorder.command.DonutOrderCommand;
import me.serbob.donutorder.command.DonutOrderTabCompleter;
import me.serbob.donutorder.currency.VaultCurrencyHook;
import me.serbob.donutorder.inventory.gui.GUIListener;
import me.serbob.donutorder.inventory.gui.GUIManager;
import me.serbob.donutorder.manager.OrderManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class DonutOrder extends JavaPlugin {
    @Getter
    private OrderManager orderManager;
    
    @Getter
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        orderManager = new OrderManager(this);
        guiManager = new GUIManager();
        
        setupCurrency();
        setupShop();
        
        getCommand("donutorder").setExecutor(new DonutOrderCommand(this));
        getCommand("donutorder").setTabCompleter(new DonutOrderTabCompleter());
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getLogger().info("DonutOrder has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (orderManager != null) {
            orderManager.saveOrders();
        }
        
        getLogger().info("DonutOrder has been disabled!");
    }
    
    private void setupCurrency() {
        CurrencyManager currencyManager = CurrencyManager.getInstance();
        
        if (getConfig().getBoolean("currency.enabled", true)) {
            if (Bukkit.getPluginManager().getPlugin("Vault") != null) {
                currencyManager.registerCurrency(new VaultCurrencyHook());
            }
            
            String currencyType = getConfig().getString("currency.type", "vault");
            currencyManager.setActiveCurrency(currencyType);
        }
        
        Bukkit.getPluginManager().callEvent(new CurrencyRegistrationCompleteEvent(
                currencyManager.getRegisteredCurrencies(),
                currencyManager.getActiveCurrency()
        ));
    }
    
    private void setupShop() {
        ShopManager shopManager = ShopManager.getInstance();
        
        if (getConfig().getBoolean("shop.enabled", true)) {
            String shopType = getConfig().getString("shop.type", "none");
            shopManager.setActiveShop(shopType);
        }
        
        Bukkit.getPluginManager().callEvent(new ShopRegistrationCompleteEvent(
                shopManager.getRegisteredShops(),
                shopManager.getActiveShop()
        ));
    }
    
    public String getMessage(String key) {
        String message = getConfig().getString("messages." + key, key);
        String prefix = getConfig().getString("messages.prefix", "&6[DonutOrder] &r");
        return (prefix + message).replace("&", "§");
    }
    
    public String getMessage(String key, String defaultValue) {
        String message = getConfig().getString("messages." + key, defaultValue);
        return message.replace("&", "§");
    }
}