mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
Remove unnecessary casts (and superfluous exceptions in throws clauses).
This commit is contained in:
parent
92e36da1f5
commit
e988f5697c
@ -439,7 +439,7 @@ public class ArenaListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LivingEntity entity = (LivingEntity) event.getEntity();
|
LivingEntity entity = event.getEntity();
|
||||||
if (arena.isRunning() && entity instanceof Slime)
|
if (arena.isRunning() && entity instanceof Slime)
|
||||||
monsters.addMonster(entity);
|
monsters.addMonster(entity);
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ public class MAUtils
|
|||||||
{
|
{
|
||||||
world.getBlockAt(i,ly1+1,lz2-1).setTypeIdAndData(63, (byte)0x8, false);
|
world.getBlockAt(i,ly1+1,lz2-1).setTypeIdAndData(63, (byte)0x8, false);
|
||||||
Sign sign = (Sign) world.getBlockAt(i,ly1+1,lz2-1).getState();
|
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();
|
sign.update();
|
||||||
}
|
}
|
||||||
world.getBlockAt(lx2-2,ly1+1,lz1+2).setType(Material.IRON_BLOCK);
|
world.getBlockAt(lx2-2,ly1+1,lz1+2).setType(Material.IRON_BLOCK);
|
||||||
|
@ -125,7 +125,7 @@ public class MonsterManager
|
|||||||
|
|
||||||
public void removePets(Player p) {
|
public void removePets(Player p) {
|
||||||
for (Wolf w : pets) {
|
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;
|
continue;
|
||||||
|
|
||||||
w.setOwner(null);
|
w.setOwner(null);
|
||||||
|
@ -52,7 +52,7 @@ public class InventoryManager
|
|||||||
p.updateInventory();
|
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
|
// Try to grab the items from memory first
|
||||||
ItemStack[] items = this.items.get(p);
|
ItemStack[] items = this.items.get(p);
|
||||||
ItemStack[] armor = this.armor.get(p);
|
ItemStack[] armor = this.armor.get(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user