From b6bf0d2a679a47ecac0b03971465bbd36817d7c4 Mon Sep 17 00:00:00 2001 From: Soper Date: Mon, 3 May 2021 00:39:54 -0400 Subject: [PATCH] second real commit --- .gitignore | 3 ++ README.md | 3 ++ src/plugin.yml | 10 ++++ src/xyz/soper/arty/Artillery.java | 51 +++++++++++++++++++ .../arty/Events/Listeners/MortarInteract.java | 4 ++ 5 files changed, 71 insertions(+) create mode 100644 .gitignore create mode 100644 src/plugin.yml create mode 100644 src/xyz/soper/arty/Artillery.java create mode 100644 src/xyz/soper/arty/Events/Listeners/MortarInteract.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0c11e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/out/ +/.idea/ +Arty.iml \ No newline at end of file diff --git a/README.md b/README.md index e69de29..4499338 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,3 @@ +# Artillery! + +Quadratics! \ No newline at end of file diff --git a/src/plugin.yml b/src/plugin.yml new file mode 100644 index 0000000..1cf77b2 --- /dev/null +++ b/src/plugin.yml @@ -0,0 +1,10 @@ +name: Artillery +version: 0.0.1 +author: Soper Aylamo +main: xyz.soper.arty.Artillery +api-version: 1.16 +website: https://home.soper.xyz/projects/Artillery +commands: + test: + description: swag test + usage: sex \ No newline at end of file diff --git a/src/xyz/soper/arty/Artillery.java b/src/xyz/soper/arty/Artillery.java new file mode 100644 index 0000000..2700721 --- /dev/null +++ b/src/xyz/soper/arty/Artillery.java @@ -0,0 +1,51 @@ +package xyz.soper.arty; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.ShapedRecipe; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.plugin.java.JavaPlugin; + +import javax.naming.Name; +import java.util.ArrayList; +import java.util.List; + +public class Artillery extends JavaPlugin { + + @Override + public void onEnable(){ + + ItemStack baseMortar = new ItemStack(Material.BREWING_STAND); + ItemMeta mortarMeta = baseMortar.getItemMeta(); + + List mortarLore = new ArrayList(); + mortarLore.add(ChatColor.GRAY + "" + ChatColor.UNDERLINE + "Mortal Level I"); + mortarLore.add("Max Initial Velocity: "); + mortarLore.add("Dispersion: "); + mortarLore.add("Chance of Failure: "); + + assert mortarMeta != null; + mortarMeta.setDisplayName(ChatColor.GRAY + "Mortar"); + mortarMeta.setLore(mortarLore); + baseMortar.setItemMeta(mortarMeta); + + NamespacedKey mortarKey = new NamespacedKey(this, "mortar"); + ShapedRecipe baseMortarRecipe = new ShapedRecipe(mortarKey, baseMortar); + baseMortarRecipe.shape("S S", "SPS", "SFS"); + baseMortarRecipe.setIngredient('S', Material.SMOOTH_STONE); + baseMortarRecipe.setIngredient('P', Material.STONE_PRESSURE_PLATE); + baseMortarRecipe.setIngredient('F', Material.FLINT); + + Bukkit.addRecipe(baseMortarRecipe); + + //getServer().getPluginManager().registerEvents(); + } + + @Override + public void onDisable(){ + } + +} diff --git a/src/xyz/soper/arty/Events/Listeners/MortarInteract.java b/src/xyz/soper/arty/Events/Listeners/MortarInteract.java new file mode 100644 index 0000000..7326410 --- /dev/null +++ b/src/xyz/soper/arty/Events/Listeners/MortarInteract.java @@ -0,0 +1,4 @@ +package xyz.soper.arty.Events.Listeners; + +public class MortarInteract { +}