Skip to content

Commit

Permalink
Small fixes, push to v1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Sn0wStorm committed Aug 18, 2019
1 parent 3ee9ced commit 4cd2da0
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.dre</groupId>
<artifactId>brewery</artifactId>
<version>1.7.2</version>
<version>1.8</version>
<name>Brewery</name>

<properties>
Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/de/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/en/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/fr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/it/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/de/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/en/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/fr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/it/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/zh/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 饮品制成后的颜色.
# 可用颜色列表:
Expand Down
2 changes: 1 addition & 1 deletion resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
8 changes: 7 additions & 1 deletion src/com/dre/brewery/MCBarrel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}


Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 9 additions & 1 deletion src/com/dre/brewery/filedata/ConfigUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/dre/brewery/listeners/CommandListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/com/dre/brewery/listeners/InventoryListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4cd2da0

Please sign in to comment.