From 0797d0f9eb588916bfd8d9a478ae4c8c79b164f9 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Sat, 24 Apr 2021 11:33:49 +1200 Subject: [PATCH] Add ItemStack with meta data --- .../gg/wildfrontier/goldpanning/PanItem.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/gg/wildfrontier/goldpanning/PanItem.java diff --git a/src/main/java/gg/wildfrontier/goldpanning/PanItem.java b/src/main/java/gg/wildfrontier/goldpanning/PanItem.java new file mode 100644 index 0000000..455163d --- /dev/null +++ b/src/main/java/gg/wildfrontier/goldpanning/PanItem.java @@ -0,0 +1,28 @@ +package gg.wildfrontier.goldpanning; + +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; + +public class PanItem extends ItemStack{ + int chance, adddelaymin, adddelaymax, removedelaymin, removedelaymax; + public PanItem(String material, int chance, int adddelaymin, int adddelaymax, int removedelaymin, int removedelaymax) { + super(Material.getMaterial(material), 1); + this.chance = chance; + this.adddelaymin = adddelaymin; + this.adddelaymax = adddelaymax; + this.removedelaymin = removedelaymin; + this.removedelaymax = removedelaymax; + + } + public Boolean spawn() { + return (Math.random()*100)