Fix formatting.

This commit is contained in:
Erik Broes
2012-01-14 23:02:10 +01:00
parent 61ec751ca1
commit a4ce846d07
68 changed files with 322 additions and 465 deletions

View File

@@ -63,7 +63,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
}
public boolean contains(int materialId) {
for (ItemStack item: getContents()) {
for (ItemStack item : getContents()) {
if (item != null && item.getTypeId() == materialId) {
return true;
}
@@ -79,7 +79,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
if (item == null) {
return false;
}
for (ItemStack i: getContents()) {
for (ItemStack i : getContents()) {
if (item.equals(i)) {
return true;
}
@@ -89,7 +89,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
public boolean contains(int materialId, int amount) {
int amt = 0;
for (ItemStack item: getContents()) {
for (ItemStack item : getContents()) {
if (item != null && item.getTypeId() == materialId) {
amt += item.getAmount();
}
@@ -106,7 +106,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
return false;
}
int amt = 0;
for (ItemStack i: getContents()) {
for (ItemStack i : getContents()) {
if (item.equals(i)) {
amt += item.getAmount();
}

View File

@@ -175,10 +175,10 @@ public class CraftItemStack extends ItemStack {
}
for (int i = 0; i < list.size(); i++) {
short id = ((NBTTagCompound)list.get(i)).getShort("id");
short level = ((NBTTagCompound)list.get(i)).getShort("lvl");
short id = ((NBTTagCompound) list.get(i)).getShort("id");
short level = ((NBTTagCompound) list.get(i)).getShort("lvl");
result.put(Enchantment.getById(id), (int)level);
result.put(Enchantment.getById(id), (int) level);
}
return result;
@@ -197,8 +197,8 @@ public class CraftItemStack extends ItemStack {
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
NBTTagCompound subtag = new NBTTagCompound();
subtag.setShort("id", (short)entry.getKey().getId());
subtag.setShort("lvl", (short)(int)entry.getValue());
subtag.setShort("id", (short) entry.getKey().getId());
subtag.setShort("lvl", (short) (int) entry.getValue());
list.add(subtag);
}