diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7b97560 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..7e7eddb --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4b661a5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..b2b2e85 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1594430981582 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Chainmail.iml b/Chainmail.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/Chainmail.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a44b0bd --- /dev/null +++ b/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + dev.coomware + Chainmail + 1.0-SNAPSHOT + + + + papermc + https://papermc.io/repo/repository/maven-public/ + + + + + + com.destroystokyo.paper + paper-api + 1.16.1-R0.1-SNAPSHOT + provided + + + + + \ No newline at end of file diff --git a/src/main/java/dev/coomware/Chainmail.java b/src/main/java/dev/coomware/Chainmail.java new file mode 100644 index 0000000..bc69f70 --- /dev/null +++ b/src/main/java/dev/coomware/Chainmail.java @@ -0,0 +1,67 @@ +package dev.coomware; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.ShapedRecipe; +import org.bukkit.plugin.java.JavaPlugin; + +public class Chainmail extends JavaPlugin { + @Override + public void onEnable() { + newRecipes(); + Bukkit.getLogger().info("Successfully added new recipes for chainmail armor."); + Bukkit.getLogger().info("This plugin was made by CoomWare."); + } + + @Override + public void onDisable() { + Bukkit.getLogger().info("[Chainmail] by CoomWare has been disabled."); + } + + private void newRecipes() { + //New namespaced keys for identification for each new recipe. + NamespacedKey key1 = new NamespacedKey(this, "chain_helmet_recipe"); + NamespacedKey key2 = new NamespacedKey(this, "chaim_chest_recipe"); + NamespacedKey key3 = new NamespacedKey(this, "chain_pants_recipe"); + NamespacedKey key4 = new NamespacedKey(this, "chain_boots_recipe"); + + //Define the final item to create + ItemStack helmet = new ItemStack(Material.CHAINMAIL_HELMET); + ItemStack chest = new ItemStack(Material.CHAINMAIL_CHESTPLATE); + ItemStack pants = new ItemStack(Material.CHAINMAIL_LEGGINGS); + ItemStack boots = new ItemStack(Material.CHAINMAIL_BOOTS); + + //Initialize new recipe instances + ShapedRecipe chelm = new ShapedRecipe(key1, helmet); + ShapedRecipe cchest = new ShapedRecipe(key2, chest); + ShapedRecipe cpants = new ShapedRecipe(key3, pants); + ShapedRecipe cboots = new ShapedRecipe(key4, boots); + + //Define the shape of the recipes + chelm.shape("ccc","cac","aaa"); + cchest.shape("cac","ccc","ccc"); + cpants.shape("ccc","cac","cac"); + cboots.shape("aaa","cac","cac"); + + //Helmet + chelm.setIngredient('c', Material.CHAIN); + chelm.setIngredient('a', Material.AIR); + //Chestplate + cchest.setIngredient('c', Material.CHAIN); + cchest.setIngredient('a', Material.AIR); + //Leggings + cpants.setIngredient('c', Material.CHAIN); + cpants.setIngredient('a', Material.AIR); + //Boots + cboots.setIngredient('c', Material.CHAIN); + cboots.setIngredient('a', Material.AIR); + + //Add all the new recipes to the server :) + getServer().addRecipe(chelm); + getServer().addRecipe(cchest); + getServer().addRecipe(cpants); + getServer().addRecipe(cboots); + } +} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..7ce2557 --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,6 @@ +name: Chainmail +main: dev.coomware.Chainmail +version: 1.0.0-FINAL +description: Plugin which adds a recipe for chainmail armor using chains. +author: CoomWare +api-version: 1.16 \ No newline at end of file diff --git a/target/Chainmail.jar b/target/Chainmail.jar new file mode 100644 index 0000000..11920b1 Binary files /dev/null and b/target/Chainmail.jar differ diff --git a/target/classes/dev/coomware/Chainmail.class b/target/classes/dev/coomware/Chainmail.class new file mode 100644 index 0000000..26b9901 Binary files /dev/null and b/target/classes/dev/coomware/Chainmail.class differ diff --git a/target/classes/plugin.yml b/target/classes/plugin.yml new file mode 100644 index 0000000..7ce2557 --- /dev/null +++ b/target/classes/plugin.yml @@ -0,0 +1,6 @@ +name: Chainmail +main: dev.coomware.Chainmail +version: 1.0.0-FINAL +description: Plugin which adds a recipe for chainmail armor using chains. +author: CoomWare +api-version: 1.16 \ No newline at end of file diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..3a1cd95 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Fri Jul 10 20:54:50 CDT 2020 +version=1.0-SNAPSHOT +groupId=dev.coomware +artifactId=Chainmail diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..63f1324 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1 @@ +dev\coomware\Chainmail.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..2e4a694 --- /dev/null +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1 @@ +C:\Users\Nilbog\Documents\NetBeansProjects\Chainmail\src\main\java\dev\coomware\Chainmail.java diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29