The name of the barrel-inventory is now equal to the Etc_Barrel option in the language file.

This commit is contained in:
Frank Baumann 2014-03-05 12:51:33 +01:00
parent 66aeb55157
commit 47f8007817
2 changed files with 8 additions and 7 deletions

View File

@ -29,9 +29,9 @@ public class Barrel {
public Barrel(Block spigot, Map<String, Object> items, float time) {
this.spigot = spigot;
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 {
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()) {
if (items.get(slot) instanceof ItemStack) {
@ -46,9 +46,9 @@ public class Barrel {
public Barrel(Block spigot, float time) {
this.spigot = spigot;
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 {
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;
barrels.add(this);
@ -72,9 +72,9 @@ public class Barrel {
public void open(Player player) {
if (inventory == null) {
if (isLarge()) {
inventory = org.bukkit.Bukkit.createInventory(null, 27, "Fass");
inventory = org.bukkit.Bukkit.createInventory(null, 27, P.p.languageReader.get("Etc_Barrel"));
} else {
inventory = org.bukkit.Bukkit.createInventory(null, 9, "Fass");
inventory = org.bukkit.Bukkit.createInventory(null, 9, P.p.languageReader.get("Etc_Barrel"));
}
} else {
if (time > 0) {

View File

@ -14,6 +14,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.Material;
import com.dre.brewery.Brew;
import com.dre.brewery.P;
public class InventoryListener implements Listener {
@ -59,7 +60,7 @@ public class InventoryListener implements Listener {
return;
}
} 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;
}
} else {