add lore
This commit is contained in:
parent
9176cf836e
commit
ce0e065dfe
1 changed files with 21 additions and 0 deletions
|
@ -12,6 +12,7 @@ import org.bukkit.generator.ChunkGenerator;
|
|||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.RecipeChoice;
|
||||
import org.bukkit.inventory.ShapedRecipe;
|
||||
import org.bukkit.inventory.meta.Damageable;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin {
|
||||
|
@ -22,6 +23,10 @@ public class Main extends JavaPlugin {
|
|||
|
||||
NamespacedKey key = new NamespacedKey(this, "FlintAxe");
|
||||
ItemStack item = new ItemStack(Material.STONE_AXE);
|
||||
Damageable meta = (Damageable) item.getItemMeta();
|
||||
meta.setMaxDamage(80);
|
||||
meta.displayName(Component.text("Flint Axe"));
|
||||
item.setItemMeta(meta);
|
||||
|
||||
ShapedRecipe recipe = new ShapedRecipe(key, item);
|
||||
recipe.shape("A ", "B ", " ");
|
||||
|
@ -31,6 +36,10 @@ public class Main extends JavaPlugin {
|
|||
|
||||
key = new NamespacedKey(this, "FlintPickaxe");
|
||||
item = new ItemStack(Material.STONE_PICKAXE);
|
||||
meta = (Damageable) item.getItemMeta();
|
||||
meta.setMaxDamage(100);
|
||||
meta.displayName(Component.text("Flint Pickaxe"));
|
||||
item.setItemMeta(meta);
|
||||
|
||||
recipe = new ShapedRecipe(key, item);
|
||||
recipe.shape("AA ", "B ", " ");
|
||||
|
@ -117,6 +126,18 @@ public class Main extends JavaPlugin {
|
|||
recipe.shape("AA ", "AA ", " ");
|
||||
recipe.setIngredient('A', Material.GRAVEL);
|
||||
|
||||
getServer().addRecipe(recipe);
|
||||
|
||||
|
||||
key = new NamespacedKey(this, "AltUpgrade");
|
||||
item = new ItemStack(Material.NETHERITE_UPGRADE_SMITHING_TEMPLATE);
|
||||
|
||||
recipe = new ShapedRecipe(key, item);
|
||||
recipe.shape("ABA", "ACA", "AAA");
|
||||
recipe.setIngredient('A', Material.DIAMOND);
|
||||
recipe.setIngredient('B', Material.NETHERITE_INGOT);
|
||||
recipe.setIngredient('C', Material.NETHERRACK);
|
||||
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue