mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2024-11-29 12:45:14 +01:00
The name of the barrel-inventory is now equal to the Etc_Barrel option in the language file.
This commit is contained in:
parent
66aeb55157
commit
47f8007817
@ -29,9 +29,9 @@ public class Barrel {
|
|||||||
public Barrel(Block spigot, Map<String, Object> items, float time) {
|
public Barrel(Block spigot, Map<String, Object> items, float time) {
|
||||||
this.spigot = spigot;
|
this.spigot = spigot;
|
||||||
if (isLarge()) {
|
if (isLarge()) {
|
||||||
this.inventory = org.bukkit.Bukkit.createInventory(null, 27, "Fass");
|
this.inventory = org.bukkit.Bukkit.createInventory(null, 27, P.p.languageReader.get("Etc_Barrel"));
|
||||||
} else {
|
} else {
|
||||||
this.inventory = org.bukkit.Bukkit.createInventory(null, 9, "Fass");
|
this.inventory = org.bukkit.Bukkit.createInventory(null, 9, P.p.languageReader.get("Etc_Barrel"));
|
||||||
}
|
}
|
||||||
for (String slot : items.keySet()) {
|
for (String slot : items.keySet()) {
|
||||||
if (items.get(slot) instanceof ItemStack) {
|
if (items.get(slot) instanceof ItemStack) {
|
||||||
@ -46,9 +46,9 @@ public class Barrel {
|
|||||||
public Barrel(Block spigot, float time) {
|
public Barrel(Block spigot, float time) {
|
||||||
this.spigot = spigot;
|
this.spigot = spigot;
|
||||||
if (isLarge()) {
|
if (isLarge()) {
|
||||||
this.inventory = org.bukkit.Bukkit.createInventory(null, 27, "Fass");
|
this.inventory = org.bukkit.Bukkit.createInventory(null, 27, P.p.languageReader.get("Etc_Barrel"));
|
||||||
} else {
|
} else {
|
||||||
this.inventory = org.bukkit.Bukkit.createInventory(null, 9, "Fass");
|
this.inventory = org.bukkit.Bukkit.createInventory(null, 9, P.p.languageReader.get("Etc_Barrel"));
|
||||||
}
|
}
|
||||||
this.time = time;
|
this.time = time;
|
||||||
barrels.add(this);
|
barrels.add(this);
|
||||||
@ -72,9 +72,9 @@ public class Barrel {
|
|||||||
public void open(Player player) {
|
public void open(Player player) {
|
||||||
if (inventory == null) {
|
if (inventory == null) {
|
||||||
if (isLarge()) {
|
if (isLarge()) {
|
||||||
inventory = org.bukkit.Bukkit.createInventory(null, 27, "Fass");
|
inventory = org.bukkit.Bukkit.createInventory(null, 27, P.p.languageReader.get("Etc_Barrel"));
|
||||||
} else {
|
} else {
|
||||||
inventory = org.bukkit.Bukkit.createInventory(null, 9, "Fass");
|
inventory = org.bukkit.Bukkit.createInventory(null, 9, P.p.languageReader.get("Etc_Barrel"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (time > 0) {
|
if (time > 0) {
|
||||||
|
@ -14,6 +14,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
||||||
import com.dre.brewery.Brew;
|
import com.dre.brewery.Brew;
|
||||||
|
import com.dre.brewery.P;
|
||||||
|
|
||||||
public class InventoryListener implements Listener {
|
public class InventoryListener implements Listener {
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ public class InventoryListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (event.getInventory().getType() == InventoryType.CHEST) {
|
} else if (event.getInventory().getType() == InventoryType.CHEST) {
|
||||||
if (!event.getInventory().getTitle().equals("Fass")) {
|
if (!event.getInventory().getTitle().equals(P.p.languageReader.get("Etc_Barrel"))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user