Remove unnecessary casts (and superfluous exceptions in throws clauses).

This commit is contained in:
Andreas Troelsen 2017-03-13 21:31:16 +01:00
parent 92e36da1f5
commit e988f5697c
4 changed files with 4 additions and 4 deletions

View File

@ -439,7 +439,7 @@ public class ArenaListener
}
}
LivingEntity entity = (LivingEntity) event.getEntity();
LivingEntity entity = event.getEntity();
if (arena.isRunning() && entity instanceof Slime)
monsters.addMonster(entity);

View File

@ -427,7 +427,7 @@ public class MAUtils
{
world.getBlockAt(i,ly1+1,lz2-1).setTypeIdAndData(63, (byte)0x8, false);
Sign sign = (Sign) world.getBlockAt(i,ly1+1,lz2-1).getState();
sign.setLine(0, TextUtils.camelCase((String)iterator.next()));
sign.setLine(0, TextUtils.camelCase(iterator.next()));
sign.update();
}
world.getBlockAt(lx2-2,ly1+1,lz1+2).setType(Material.IRON_BLOCK);

View File

@ -125,7 +125,7 @@ public class MonsterManager
public void removePets(Player p) {
for (Wolf w : pets) {
if (w == null || !(w.getOwner() instanceof Player) || !((Player) w.getOwner()).getName().equals(p.getName()))
if (w == null || !(w.getOwner() instanceof Player) || !w.getOwner().getName().equals(p.getName()))
continue;
w.setOwner(null);

View File

@ -52,7 +52,7 @@ public class InventoryManager
p.updateInventory();
}
public void restoreInv(Player p) throws FileNotFoundException, IOException, InvalidConfigurationException {
public void restoreInv(Player p) throws IOException, InvalidConfigurationException {
// Try to grab the items from memory first
ItemStack[] items = this.items.get(p);
ItemStack[] armor = this.armor.get(p);