diff --git a/pom.xml b/pom.xml
index 5dc552e..4c168f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,11 +107,12 @@
https://repo.codemc.org/repository/maven-public
-
+
MMOPlugins
https://mvn.lumine.io/repository/maven-releases/
+
Lichtspiele
https://nexus.lichtspiele.org/repository/releases/
diff --git a/resources/config/v12/de/config.yml b/resources/config/v12/de/config.yml
index 0f9e306..4cd2656 100644
--- a/resources/config/v12/de/config.yml
+++ b/resources/config/v12/de/config.yml
@@ -453,6 +453,7 @@ recipes:
# -- Plugin Kompatiblität --
# Andere Plugins (wenn installiert) nach Rechten zum öffnen von Fässern checken [true]
+# Plugins 'Landlord' und 'Protection Stones' nutzen WorldGuard. 'ClaimChunk' wird nativ unterstützt.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -462,6 +463,7 @@ useCitadel: true
# Beim öffnen eine virtuelle Kiste nutzen um Rechte bei alle anderen Plugins abzufragen
# Könnte Anti-Cheat plugins verwirren aber sonst ok zu aktivieren
+# Diese Option für das Plugin 'Residence' aktivieren, und andere Plugins, die nicht alle Fälle des PlayerInteractEvent checken
useVirtualChestPerms: false
# Änderungen an Fassinventaren mit LogBlock aufzeichen [true]
diff --git a/resources/config/v12/en/config.yml b/resources/config/v12/en/config.yml
index 918845b..29fa5ee 100644
--- a/resources/config/v12/en/config.yml
+++ b/resources/config/v12/en/config.yml
@@ -455,6 +455,7 @@ recipes:
# -- Plugin Compatibility --
# Enable checking of other Plugins (if installed) for Barrel Permissions [true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -464,6 +465,7 @@ useCitadel: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Enable the Logging of Barrel Inventories to LogBlock [true]
diff --git a/resources/config/v12/fr/config.yml b/resources/config/v12/fr/config.yml
index b2dce06..f1501fa 100644
--- a/resources/config/v12/fr/config.yml
+++ b/resources/config/v12/fr/config.yml
@@ -450,6 +450,7 @@ recipes:
# -- Compatibilité entre Plugins --
# Activer la vérification des autres plugins (si installés) pour les permissions des tonneaux. [true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -459,6 +460,7 @@ useCitadel: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Activer l'historique du contenu des tonneaux avec LogBlock [true]
diff --git a/resources/config/v12/it/config.yml b/resources/config/v12/it/config.yml
index a68f3d6..c2ae934 100644
--- a/resources/config/v12/it/config.yml
+++ b/resources/config/v12/it/config.yml
@@ -442,6 +442,7 @@ recipes:
# -- Compatibilità con altri plugin --
# Abilita il controllo della presenza di altri plugin per i permessi relativi ai barili[true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -451,6 +452,7 @@ useCitadel: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Abilita il logging degli inventari dei barili [true]
diff --git a/resources/config/v13/de/config.yml b/resources/config/v13/de/config.yml
index e858e14..ae63abe 100644
--- a/resources/config/v13/de/config.yml
+++ b/resources/config/v13/de/config.yml
@@ -850,6 +850,7 @@ recipes:
# -- Plugin Kompatiblität --
# Andere Plugins (wenn installiert) nach Rechten zum öffnen von Fässern checken [true]
+# Plugins 'Landlord' und 'Protection Stones' nutzen WorldGuard. 'ClaimChunk' wird nativ unterstützt.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -858,6 +859,7 @@ useGMInventories: true
# Beim Fass öffnen eine virtuelle Kiste nutzen um Rechte bei allen anderen Plugins abzufragen
# Könnte Anti-Cheat plugins verwirren aber sonst ok zu aktivieren
+# Diese Option für das Plugin 'Residence' aktivieren, und andere Plugins, die nicht alle Fälle des PlayerInteractEvent checken
useVirtualChestPerms: false
diff --git a/resources/config/v13/en/config.yml b/resources/config/v13/en/config.yml
index 1d0af92..0cefd17 100644
--- a/resources/config/v13/en/config.yml
+++ b/resources/config/v13/en/config.yml
@@ -844,6 +844,7 @@ recipes:
# -- Plugin Compatibility --
# Enable checking of other Plugins (if installed) for Barrel Permissions [true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -852,6 +853,7 @@ useGMInventories: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Enable the Logging of Barrel Inventories to LogBlock [true]
diff --git a/resources/config/v13/es/config.yml b/resources/config/v13/es/config.yml
index ee11481..b68fba8 100644
--- a/resources/config/v13/es/config.yml
+++ b/resources/config/v13/es/config.yml
@@ -844,6 +844,7 @@ recipes:
# -- Plugin Compatibility --
# Enable checking of other Plugins (if installed) for Barrel Permissions [true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -852,6 +853,7 @@ useGMInventories: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Enable the Logging of Barrel Inventories to LogBlock [true]
diff --git a/resources/config/v13/fr/config.yml b/resources/config/v13/fr/config.yml
index fc0ff3c..92c3d2a 100644
--- a/resources/config/v13/fr/config.yml
+++ b/resources/config/v13/fr/config.yml
@@ -850,6 +850,7 @@ recipes:
# -- Compatibilité entre Plugins --
# Activer la vérification des autres plugins (si installés) pour les permissions des tonneaux. [true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -858,6 +859,7 @@ useGMInventories: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Activer l'historique du contenu des tonneaux avec LogBlock [true]
diff --git a/resources/config/v13/it/config.yml b/resources/config/v13/it/config.yml
index 59277c5..7a69258 100644
--- a/resources/config/v13/it/config.yml
+++ b/resources/config/v13/it/config.yml
@@ -844,6 +844,7 @@ eggnog:
# -- Compatibilità con altri plugin --
# Abilita il controllo della presenza di altri plugin per i permessi relativi ai barili[true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -852,6 +853,7 @@ useGMInventories: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# Abilita il logging degli inventari dei barili [true]
diff --git a/resources/config/v13/zh/config.yml b/resources/config/v13/zh/config.yml
index 1d4e00f..20491b0 100644
--- a/resources/config/v13/zh/config.yml
+++ b/resources/config/v13/zh/config.yml
@@ -848,6 +848,7 @@ recipes:
# -- 插件兼容性 --
# 检查插件以进行权限配置[true]
+# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.
useWorldGuard: true
useLWC: true
useGriefPrevention: true
@@ -856,6 +857,7 @@ useGMInventories: true
# Use a virtual chest when opening a Barrel to check with all other protection plugins
# This could confuse Anti-Cheat plugins, but is otherwise good to use
+# use this for 'Residence' Plugin and any others that don't check all cases in the PlayerInteractEvent
useVirtualChestPerms: false
# 对LogBlock启用方块数据录入[true]
diff --git a/src/com/dre/brewery/api/BreweryApi.java b/src/com/dre/brewery/api/BreweryApi.java
index 6b0c3a4..d13b336 100644
--- a/src/com/dre/brewery/api/BreweryApi.java
+++ b/src/com/dre/brewery/api/BreweryApi.java
@@ -147,6 +147,21 @@ public class BreweryApi {
return Brew.isBrew(item);
}
+ /**
+ * Create a Brew for the given Recipe Name
+ *
+ * @param recipeName The Name of the Recipe to create this Brew from
+ * @return The Brew that was created. Can use brew.createItem() to get an ItemStack
+ */
+ @Nullable
+ public static Brew createBrew(String recipeName, int quality) {
+ BRecipe matching = BRecipe.getMatching(recipeName);
+ if (matching != null) {
+ return matching.createBrew(quality);
+ }
+ return null;
+ }
+
/**
* Create a Brew from the given Recipe.
*
@@ -157,6 +172,62 @@ public class BreweryApi {
return recipe.createBrew(quality);
}
+ /**
+ * Create ItemStack for the given Recipe Name
+ *
+ * @param recipeName The Name of the Recipe to create this Item from
+ * @param quality The Quality of the Brew Item
+ * @return The Brew- ItemStack with Brew information stored on it
+ */
+ @Nullable
+ public static ItemStack createBrewItem(String recipeName, int quality) {
+ BRecipe matching = BRecipe.getMatching(recipeName);
+ if (matching != null) {
+ return matching.create(quality);
+ }
+ return null;
+ }
+
+ /**
+ * Create ItemStack for the given Recipe
+ *
+ * @param recipe The Recipe to create this Item from
+ * @param quality The Quality of the Brew Item
+ * @return The Brew- ItemStack with Brew information stored on it
+ */
+ public static ItemStack createBrewItem(BRecipe recipe, int quality) {
+ return recipe.create(quality);
+ }
+
+ /**
+ * Returns the Name of the Current Recipe of the given ItemStack
+ *
+ * @param item The ItemStack to get the Recipe Name of
+ * @return The middle-quality name of the current Recipe. Null if it is not a brew, or it currently has no Recipe
+ */
+ @Nullable
+ public static String getRecipeName(ItemStack item) {
+ Brew brew = Brew.get(item);
+ if (brew != null) {
+ return getRecipeName(brew);
+ }
+ return null;
+ }
+
+ /**
+ * Returns the Name of the Current Recipe of the given Brew
+ *
+ * @param brew The Brew to get the Recipe Name of
+ * @return The middle-quality name of the current Brew Recipe. Null if it currently has no Recipe
+ */
+ @Nullable
+ public static String getRecipeName(Brew brew) {
+ BRecipe recipe = brew.getCurrentRecipe();
+ if (recipe != null) {
+ return recipe.getRecipeName();
+ }
+ return null;
+ }
// # # # # # # # # # # # #
// # # # # # Barrel # # # # #
diff --git a/src/com/dre/brewery/integration/ShopKeepersListener.java b/src/com/dre/brewery/integration/ShopKeepersListener.java
index 176610d..7c02515 100644
--- a/src/com/dre/brewery/integration/ShopKeepersListener.java
+++ b/src/com/dre/brewery/integration/ShopKeepersListener.java
@@ -23,7 +23,7 @@ public class ShopKeepersListener implements Listener {
Set openedEditors = new HashSet<>();
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
- public void onShopCreated(PlayerOpenUIEvent event) {
+ public void onShopkeeperOpen(PlayerOpenUIEvent event) {
try {
if (event.getUIType() == DefaultUITypes.EDITOR() || event.getUIType() == DefaultUITypes.TRADING()) {
openedEditors.add(event.getPlayer());