TheCore
  • Introduction
  • Features
  • Commands and Permissions
  • Placeholders
  • TheSkills
    • Skills
    • Stats
    • Perks
  • TheCrafting
  • TheEnchanting
  • TheMinions
    • Adding Custom Minion
    • Minion Type
    • Minion Layout
  • TheBank
  • TheAuction
  • TheTrades
  • TheAnvil
  • TheAlchemy
  • TheSouls
  • ThePets
    • Adding Custom Pet
    • Adding Custom Pet with ModelEngine
  • TheDragon
    • Dragon Events
    • Setting Up Schematic
    • Setting Up Arena
    • Setting Up Guardians
  • Dev API
    • TheSkills
    • TheTrades
Powered by GitBook
On this page
  1. Dev API

TheTrades

TheTrades

package com.qualityplus.trades.base.event;

@Getter
public final class PlayerTradeEvent extends TradeEvent {
    private final PluginTrade trade;

    public PlayerTradeEvent(@NotNull Player who, PluginTrade trade) {
        super(who);

        this.trade = trade;
    }
}
import com.qualityplus.trades.api.recipes.Trades;
import com.qualityplus.trades.base.trades.PluginTrade;

public class AddTradeExample {
    public void addTradeExampleMethod(){
        Trades.registerNewTrade(PluginTrade.builder()
                .id()
                .page()
                .slot()
                .price()
                .permission()
                .displayName()
                .description()
                .itemCost()
                .itemStack()
                .build());
    }
}
PreviousTheSkills

Last updated 2 years ago