studio.magemonkey.divinity.modules.list.sell.SellTrait Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of divinity Show documentation
Show all versions of divinity Show documentation
Custom items, combat, and more!
The newest version!
package studio.magemonkey.divinity.modules.list.sell;
import studio.magemonkey.divinity.api.DivinityAPI;
import net.citizensnpcs.api.event.NPCRightClickEvent;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitName;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@TraitName("sell")
public class SellTrait extends Trait {
public SellTrait() {
super("sell");
}
@EventHandler
public void click(NPCRightClickEvent e) {
if (e.getNPC() == this.getNPC()) {
Player player = e.getClicker();
SellManager sellManager = DivinityAPI.getModuleManager().getSellManager();
if (sellManager == null) return;
sellManager.openSellGUI(player, false);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy