More code cleanup.

This commit is contained in:
KHobbits 2011-11-18 18:33:22 +00:00
parent 11f02fb947
commit 2e0fb15952
6 changed files with 6 additions and 25 deletions

View file

@ -2,7 +2,6 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.Mob;
import com.earth2me.essentials.Mob.MobException;
import com.earth2me.essentials.TargetBlock;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.Random;
@ -73,8 +72,9 @@ public class Commandspawnmob extends EssentialsCommand
{
8, 9
};
Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock();
if (block == null)
final Block block = Util.getTarget(user).getBlock();
if (block == null)
{
throw new Exception(Util.i18n("unableToSpawnMob"));
}

View file

@ -86,11 +86,7 @@ public class Commandtime extends EssentialsCommand
world.setTime(time + 24000 + ticks);
}
// Inform the sender of the change
//sender.sendMessage("");
StringBuilder msg = new StringBuilder();
boolean first = true;
for (World world : worlds)
{
if (msg.length() > 0)

View file

@ -284,6 +284,7 @@ public class SignTrade extends EssentialsSign
if (split.length == 3)
{
final int stackamount = getIntegerPositive(split[0]);
//TODO: Unused local variable
final ItemStack item = getItemStack(split[1], stackamount, ess);
final int amount = getInteger(split[2]);
final String newline = stackamount + " " + split[1] + ":" + (amount + Math.round(value));