📦New LootChest Type
After you do all the steps in the Getting Started page. Now you are started to make a new LootChest type:
Step 1
Create a class
public class NewLC extends BoxManager {
//This is the constructor and you should keep the parameter unchanged
public NewLC(Location location, Player player, ItemStack icon, TConfigManager config, String boxid, Location initialLocation) {
//Your code...
}
@Override
public boolean open() {
//You must add this checker!
if (!super.open()) {
return false;
}
//Your code...
}
@Override
public void remove() {
super.remove();
//Your code...
}
}
Step 2
After that you have to register this lootchest using:
api.getNMS().register("newlc", NewLC::new);
You must take into account the "newlc" is extremely essential. This is the identifier of this box and you have to use this id in all configurations, commands ...
Last updated