mirror of
https://github.com/SimplexDevelopment/Chainmail.git
synced 2024-11-01 00:37:11 +00:00
Initial Commit
Added the ability to craft chainmail using chains.
This commit is contained in:
parent
e346f15b58
commit
c6a770a1fa
9
.idea/codeStyles/Project.xml
Normal file
9
.idea/codeStyles/Project.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_WRAP" value="1" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
13
.idea/compiler.xml
Normal file
13
.idea/compiler.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="Chainmail" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
14
.idea/misc.xml
Normal file
14
.idea/misc.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
78
.idea/workspace.xml
Normal file
78
.idea/workspace.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="a10c035f-3136-4a06-841f-0569882b4bf7" name="Default Changelist" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="CodeStyleSettingsInfer">
|
||||
<option name="done" value="true" />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Class" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectCodeStyleSettingsMigration">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="ProjectId" id="1eWIa48TOn6CFESWEsqPKqVrAW0" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showExcludedFiles" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="project.structure.last.edited" value="Modules" />
|
||||
<property name="project.structure.proportion" value="0.0" />
|
||||
<property name="project.structure.side.proportion" value="0.0" />
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="a10c035f-3136-4a06-841f-0569882b4bf7" name="Default Changelist" comment="" />
|
||||
<created>1594430981582</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1594430981582</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="233" y="19" key="#Project_Structure" timestamp="1594431018212">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state x="233" y="19" key="#Project_Structure/0.0.1280.720@0.0.1280.720" timestamp="1594431018212" />
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.bottom" timestamp="1594433176611">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.bottom/0.0.1280.720@0.0.1280.720" timestamp="1594433176611" />
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.center" timestamp="1594433176611">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.center/0.0.1280.720@0.0.1280.720" timestamp="1594433176611" />
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.left" timestamp="1594433176610">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.left/0.0.1280.720@0.0.1280.720" timestamp="1594433176610" />
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.right" timestamp="1594433176611">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state width="1236" height="176" key="GridCell.Tab.0.right/0.0.1280.720@0.0.1280.720" timestamp="1594433176611" />
|
||||
<state x="337" y="185" key="com.intellij.ide.util.TipDialog" timestamp="1594433149112">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state x="337" y="185" key="com.intellij.ide.util.TipDialog/0.0.1280.720@0.0.1280.720" timestamp="1594433149112" />
|
||||
<state x="303" y="41" width="672" height="678" key="search.everywhere.popup" timestamp="1594432413312">
|
||||
<screen x="0" y="0" width="1280" height="720" />
|
||||
</state>
|
||||
<state x="303" y="41" width="672" height="678" key="search.everywhere.popup/0.0.1280.720@0.0.1280.720" timestamp="1594432413312" />
|
||||
</component>
|
||||
</project>
|
2
Chainmail.iml
Normal file
2
Chainmail.iml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4" />
|
28
pom.xml
Normal file
28
pom.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>dev.coomware</groupId>
|
||||
<artifactId>Chainmail</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
67
src/main/java/dev/coomware/Chainmail.java
Normal file
67
src/main/java/dev/coomware/Chainmail.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
6
src/main/resources/plugin.yml
Normal file
6
src/main/resources/plugin.yml
Normal file
@ -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
|
BIN
target/Chainmail.jar
Normal file
BIN
target/Chainmail.jar
Normal file
Binary file not shown.
BIN
target/classes/dev/coomware/Chainmail.class
Normal file
BIN
target/classes/dev/coomware/Chainmail.class
Normal file
Binary file not shown.
6
target/classes/plugin.yml
Normal file
6
target/classes/plugin.yml
Normal file
@ -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
|
5
target/maven-archiver/pom.properties
Normal file
5
target/maven-archiver/pom.properties
Normal file
@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Fri Jul 10 20:54:50 CDT 2020
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=dev.coomware
|
||||
artifactId=Chainmail
|
@ -0,0 +1 @@
|
||||
dev\coomware\Chainmail.class
|
@ -0,0 +1 @@
|
||||
C:\Users\Nilbog\Documents\NetBeansProjects\Chainmail\src\main\java\dev\coomware\Chainmail.java
|
Loading…
Reference in New Issue
Block a user