diff --git a/pom.xml b/pom.xml
index 8cdfeab1..beaeec0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.dre
brewery
- 1.7.2
+ 1.8
Brewery
diff --git a/resources/config/v12/de/config.yml b/resources/config/v12/de/config.yml
index e0c5dc6b..8be0305d 100644
--- a/resources/config/v12/de/config.yml
+++ b/resources/config/v12/de/config.yml
@@ -86,6 +86,7 @@ oldMat: true
# distillruns: Wie oft destilliert werden muss für vollen Alkoholgehalt (0=ohne Destillieren)
# distilltime: Wie lange (in sekunden) ein Destillations-Durchlauf braucht (0=Standard Zeit von 40 sek) MC Standard wäre 20 sek
# wood: Holz des Fasses 0=alle Holzsorten 1=Birke 2=Eiche 3=Jungel 4=Fichte 5=Akazie 6=Schwarzeiche
+# Das Minecraft Fass besteht aus Eiche
# age: Zeit in Minecraft-Tagen, die das Getränk im Fass reifen muss 0= kein reifen
# color: Farbe des Getränks nach destillieren/reifen.
# Benutzbare Farben: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
diff --git a/resources/config/v12/en/config.yml b/resources/config/v12/en/config.yml
index 7ac5a6dc..38eadb49 100644
--- a/resources/config/v12/en/config.yml
+++ b/resources/config/v12/en/config.yml
@@ -83,6 +83,7 @@ oldMat: true
# distillruns: How often it has to be distilled for full alcohol (0=without distilling)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak
+# The Minecraft barrel is made of oak
# age: Time in Minecraft-days, the potion has to age in a barrel 0=no aging
# color: Color of the potion after distilling/aging.
# Usable Colors: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
diff --git a/resources/config/v12/fr/config.yml b/resources/config/v12/fr/config.yml
index 962d0157..e7673d6a 100644
--- a/resources/config/v12/fr/config.yml
+++ b/resources/config/v12/fr/config.yml
@@ -84,6 +84,7 @@ oldMat: true
# distillruns: Combien de fois le breuvage devra être distillé pour un alcool de qualité (0=Ne pas distiller)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Type de bois du baril 0=aucun 1=Bouleau 2=Chêne 3=Jungle 4=Pin 5=Acacia 6=Chêne Noir
+# The Minecraft barrel is made of oak
# age: Temps en jours de Minecraft, la potion devra être âgée dans un baril. 0=Pas besoin d'âge
# color: Couleur de la potion après distillation/avoir laissé vieillir.
# Couleurs disponibles: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY (Dans l'ordre : Rouge foncé, Rouge, Rouge clair, Orange, Rose, Bleu, Cyan, Eau, Vert, Noir, Gris, Gris clair)
diff --git a/resources/config/v12/it/config.yml b/resources/config/v12/it/config.yml
index 2400d6c7..70af3f2e 100644
--- a/resources/config/v12/it/config.yml
+++ b/resources/config/v12/it/config.yml
@@ -83,6 +83,7 @@ oldMat: true
# distillruns: Quanto spesso deve essere distillato per ottenere la versione perfetta con il volume alcolico impostato (0=non serve distillare).
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Legno del barile 0=qualiasi 1=Betulla 2=Quercia 3=Mogano 4=Abete 5=Acacia 6=Quercia nera
+# The Minecraft barrel is made of oak
# age: Tempo in giorni di Minecraft per cui la pozione deve essere invecchiata in un barile (0=nessun invecchiamento).
# color: Colore della pozione dopo essere stata distillata/invecchiata
# Colori utilizzabili: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
diff --git a/resources/config/v13/de/config.yml b/resources/config/v13/de/config.yml
index 4a6b0b21..f46df44d 100644
--- a/resources/config/v13/de/config.yml
+++ b/resources/config/v13/de/config.yml
@@ -82,6 +82,7 @@ version: '1.8'
# distillruns: Wie oft destilliert werden muss für vollen Alkoholgehalt (0=ohne Destillieren)
# distilltime: Wie lange (in sekunden) ein Destillations-Durchlauf braucht (0=Standard Zeit von 40 sek) MC Standard wäre 20 sek
# wood: Holz des Fasses 0=alle Holzsorten 1=Birke 2=Eiche 3=Jungel 4=Fichte 5=Akazie 6=Schwarzeiche
+# Das Minecraft Fass besteht aus Eiche
# age: Zeit in Minecraft-Tagen, die das Getränk im Fass reifen muss 0= kein reifen
# color: Farbe des Getränks nach destillieren/reifen.
# Benutzbare Farben: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
diff --git a/resources/config/v13/en/config.yml b/resources/config/v13/en/config.yml
index 6aaeee23..cc68467c 100644
--- a/resources/config/v13/en/config.yml
+++ b/resources/config/v13/en/config.yml
@@ -79,6 +79,7 @@ version: '1.8'
# distillruns: How often it has to be distilled for full alcohol (0=without distilling)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak
+# The Minecraft barrel is made of oak
# age: Time in Minecraft-days, the potion has to age in a barrel 0=no aging
# color: Color of the potion after distilling/aging.
# Usable Colors: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
diff --git a/resources/config/v13/fr/config.yml b/resources/config/v13/fr/config.yml
index 458acb81..cc000f0b 100644
--- a/resources/config/v13/fr/config.yml
+++ b/resources/config/v13/fr/config.yml
@@ -80,6 +80,7 @@ version: '1.8'
# distillruns: Combien de fois le breuvage devra être distillé pour un alcool de qualité (0=Ne pas distiller)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Type de bois du baril 0=aucun 1=Bouleau 2=Chêne 3=Jungle 4=Pin 5=Acacia 6=Chêne Noir
+# The Minecraft barrel is made of oak
# age: Temps en jours de Minecraft, la potion devra être âgée dans un baril. 0=Pas besoin d'âge
# color: Couleur de la potion après distillation/avoir laissé vieillir.
# Couleurs disponibles: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY (Dans l'ordre : Rouge foncé, Rouge, Rouge clair, Orange, Rose, Bleu, Cyan, Eau, Vert, Noir, Gris, Gris clair)
diff --git a/resources/config/v13/it/config.yml b/resources/config/v13/it/config.yml
index 20cac78d..55649f80 100644
--- a/resources/config/v13/it/config.yml
+++ b/resources/config/v13/it/config.yml
@@ -79,6 +79,7 @@ version: '1.8'
# distillruns: Quanto spesso deve essere distillato per ottenere la versione perfetta con il volume alcolico impostato (0=non serve distillare).
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Legno del barile 0=qualiasi 1=Betulla 2=Quercia 3=Mogano 4=Abete 5=Acacia 6=Quercia nera
+# The Minecraft barrel is made of oak
# age: Tempo in giorni di Minecraft per cui la pozione deve essere invecchiata in un barile (0=nessun invecchiamento).
# color: Colore della pozione dopo essere stata distillata/invecchiata
# Colori utilizzabili: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY
diff --git a/resources/config/v13/zh/config.yml b/resources/config/v13/zh/config.yml
index f2b56087..b7faa792 100644
--- a/resources/config/v13/zh/config.yml
+++ b/resources/config/v13/zh/config.yml
@@ -80,6 +80,7 @@ version: '1.8'
# distillruns: 饮品需要在酿造台上蒸馏的次数(0=无需蒸馏).
# distilltime: 每次蒸馏所需要耗费的时间(0=默认值, 即40秒), MC默认则为20秒/
# wood: 木桶所需要的木质 0=任意 1=桦木 2=橡木 3=丛林木 4=云杉木 5=金合欢木 6=深色橡木
+# The Minecraft barrel is made of 橡木
# age: 饮品需要在木桶中熟成所需要的时间(MC天). 0=无需熟成.
# color: 饮品制成后的颜色.
# 可用颜色列表:
diff --git a/resources/plugin.yml b/resources/plugin.yml
index 46c4e30f..c7320957 100644
--- a/resources/plugin.yml
+++ b/resources/plugin.yml
@@ -1,5 +1,5 @@
name: Brewery
-version: 1.7.2
+version: 1.8
main: com.dre.brewery.P
softdepend: [LWC, LogBlock, WorldGuard, GriefPrevention, Vault, Citadel]
authors: [Milan Albrecht, Frank Baumann, ProgrammerDan, Daniel Saukel]
diff --git a/src/com/dre/brewery/MCBarrel.java b/src/com/dre/brewery/MCBarrel.java
index 28a86b30..4374b3ef 100644
--- a/src/com/dre/brewery/MCBarrel.java
+++ b/src/com/dre/brewery/MCBarrel.java
@@ -25,10 +25,12 @@ public class MCBarrel {
private byte brews = -1; // How many Brewery Brews are in this Barrel
private final Inventory inv;
+ private final int invSize;
public MCBarrel(Inventory inv) {
this.inv = inv;
+ invSize = inv.getSize();
}
@@ -56,7 +58,7 @@ public void open() {
if (item != null) {
Brew brew = Brew.get(item);
if (brew != null) {
- if (brews < maxBrews) {
+ if (brews < maxBrews || maxBrews < 0) {
// The time is in minutes, but brew.age() expects time in mc-days
brew.age(item, ((float) time) / 20f, OAK);
}
@@ -99,6 +101,10 @@ public void close() {
// There are still methods to place more Brews in that would be too tedious to catch.
// This is only for direct visual Notification, the age routine above will never age more than 6 brews in any case.
public void clickInv(InventoryClickEvent event) {
+ if (maxBrews >= invSize || maxBrews < 0) {
+ // There are enough brews allowed to fill the inventory, we don't need to keep track
+ return;
+ }
boolean adding = false;
switch (event.getAction()) {
case PLACE_ALL:
diff --git a/src/com/dre/brewery/filedata/ConfigUpdater.java b/src/com/dre/brewery/filedata/ConfigUpdater.java
index 7b98029a..ed2d0afd 100644
--- a/src/com/dre/brewery/filedata/ConfigUpdater.java
+++ b/src/com/dre/brewery/filedata/ConfigUpdater.java
@@ -1161,7 +1161,11 @@ private void update17de() {
}
}
if (index != -1) {
- addLines(index + 1, "# Halte ein Item in der Hand und benutze /brew configname um dessen Material herauszufinden und für ein Rezept zu benutzen");
+ addLines(index + 1, "# Halte ein Item in der Hand und benutze /brew ItemName um dessen Material herauszufinden und für ein Rezept zu benutzen");
+ }
+ index = indexOfStart("# wood: Holz des Fasses");
+ if (index != -1) {
+ addLines(index + 1, "# Das Minecraft Fass besteht aus Eiche");
}
if (P.use1_13) updateMaterialDescriptions(true);
}
@@ -1210,6 +1214,10 @@ private void update17en() {
if (index != -1) {
addLines(index + 1, "# With an item in your hand, use /brew ItemName to get its material for use in a recipe");
}
+ index = indexOfStart("# wood: Wood of the barrel");
+ if (index != -1) {
+ addLines(index + 1, "# The Minecraft barrel is made of oak");
+ }
if (P.use1_13) updateMaterialDescriptions(false);
}
diff --git a/src/com/dre/brewery/listeners/CommandListener.java b/src/com/dre/brewery/listeners/CommandListener.java
index 880b8a0d..60a6ece0 100644
--- a/src/com/dre/brewery/listeners/CommandListener.java
+++ b/src/com/dre/brewery/listeners/CommandListener.java
@@ -43,7 +43,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
p.msg(sender, p.languageReader.get("Error_NoPermissions"));
}
- } else if (cmd.equalsIgnoreCase("configname") || cmd.equalsIgnoreCase("itemname")) {
+ } else if (cmd.equalsIgnoreCase("configname") || cmd.equalsIgnoreCase("itemname") || cmd.equalsIgnoreCase("iteminfo")) {
if (sender.hasPermission("brewery.cmd.reload")) {
cmdItemName(sender);
diff --git a/src/com/dre/brewery/listeners/InventoryListener.java b/src/com/dre/brewery/listeners/InventoryListener.java
index bbc791fe..92263d0a 100644
--- a/src/com/dre/brewery/listeners/InventoryListener.java
+++ b/src/com/dre/brewery/listeners/InventoryListener.java
@@ -310,7 +310,7 @@ public void onInventoryClick(InventoryClickEvent event) {
if (event.getSlot() > 2) {
return;
}
- } else if (!(event.getInventory().getHolder() instanceof Barrel) && !(event.getInventory().getHolder() instanceof org.bukkit.block.Barrel)) {
+ } else if (!(event.getInventory().getHolder() instanceof Barrel) && !(P.use1_14 && event.getInventory().getHolder() instanceof org.bukkit.block.Barrel)) {
return;
}