NullValkyrie

Minecraft 1.19 multipurpose plugin for spigot servers with a lot of features where most modern servers have.
git clone https://codeberg.org/night0721/NullValkyrie
Log | Files | Refs | README | LICENSE

Items.java (2070B)


      1 package me.night.nullvalkyrie.entities.items;
      2 
      3 import me.night.nullvalkyrie.entities.miners.Rarity;
      4 import org.bukkit.Material;
      5 
      6 public enum Items {
      7 
      8     ETERNALSTARE("Eternal Stare", 29, Rarity.LEGENDARY, Material.COAL, 10), // legendary charm
      9     MORNINGTEA("Morning Tea", 28, Rarity.EPIC, Material.IRON_INGOT, 12), // epic emote
     10     PARACHUTE("Parachute - Doomed Chorus", 11, Rarity.EPIC, Material.GOLD_INGOT, 14), // epic parachute
     11     RALLYCAR("Rally Car - Doomed Chorus", 10, Rarity.EPIC, Material.REDSTONE, 16), //epic backpack
     12     WORLDAFLAME("World Aflame", 6.5, Rarity.LEGENDARY, Material.LAPIS_LAZULI, 28), // legendary background
     13     MOLOTOVCOTAIL("Molotov Cotail - Soul Flame", 5.5, Rarity.EPIC, Material.COPPER_INGOT, 30), // epic throwable
     14     KATANA("Katana - Silent Echo", 4.67, Rarity.EPIC, Material.EMERALD, 32), // epic melee
     15     DLQ33("DL Q33 - Doomed Chorus", 4, Rarity.EPIC, Material.QUARTZ, 34), // epic gun
     16     DAME("Dame - Shot Caller", 1.25, Rarity.EPIC, Material.DIAMOND, 19), // character epic
     17     KILO141("Kilo 141 - Demonsong", 0.08, Rarity.LEGENDARY, Material.NETHERITE_INGOT, 25); // weapon legendary
     18 
     19     private final String name;
     20     private final double weight;
     21     private final Rarity rarity;
     22     private final Material material;
     23     private final int slot;
     24 
     25     Items(String name, double weight, Rarity rarity, Material material, int slot) {
     26         this.name = name;
     27         this.weight = weight;
     28         this.rarity = rarity;
     29         this.material = material;
     30         this.slot = slot;
     31     }
     32     public static Items getByName(String name) {
     33         for (Items item : Items.values()) {
     34             if (item.getName().equalsIgnoreCase(name)) {
     35                 return item;
     36             }
     37         }
     38         return null;
     39     }
     40     public String getName() {
     41         return name;
     42     }
     43 
     44     public double getWeight() {
     45         return weight;
     46     }
     47 
     48     public Rarity getRarity() {
     49         return rarity;
     50     }
     51 
     52     public Material getMaterial() {
     53         return material;
     54     }
     55 
     56     public int getSlot() {
     57         return slot;
     58     }
     59 }