Skip to content

Commit

Permalink
Merge pull request #2 from kiriDevs/recipe/craft/bell
Browse files Browse the repository at this point in the history
Add Bell Crafting Recipe
  • Loading branch information
kiriDevs authored Feb 12, 2022
2 parents 8591368 + c566e2c commit 1ad762c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.kiridevs</groupId>
<artifactId>ksmpplugin</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>jar</packaging>

<name>kiriSMP Plugin</name>
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/de/kiridevs/ksmpplugin/recipes/BellRecipe.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package de.kiridevs.ksmpplugin.recipes;

import de.kiridevs.ksmpplugin.main.Main;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.plugin.Plugin;

import java.util.ArrayList;

public class BellRecipe extends _RecipeTemplate {
public BellRecipe(Plugin plugin) {
super(plugin, Material.BELL);
}

@Override
protected ArrayList<Recipe> buildRecipes() {
NamespacedKey nsKey = new NamespacedKey(this.nsPlugin, "bellRecipe");
Recipe rec1 = new ShapedRecipe(nsKey, this.outputStack)
.shape("rsr", "ggg", "gig")
.setIngredient('r', Material.STONE)
.setIngredient('s', Material.STICK)
.setIngredient('g', Material.GOLD_INGOT)
.setIngredient('i', Material.IRON_INGOT);

return new ArrayList<>() {{ add(rec1); }};
}

@Override
protected boolean shouldRegister() {
return Main.config.doAllowCrafting("bell");
}
}
3 changes: 2 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ craftingRecipes:
wait: true
otherside: false
pigstep: false
sculkSensor: true
sculkSensor: true
bell: true
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
main: de.kiridevs.ksmpplugin.main.Main

name: kiriSMP
version: 1.2.0
version: 1.3.0
api-version: 1.18
author: kiriDevs

Expand Down

0 comments on commit 1ad762c

Please sign in to comment.