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));

View File

@ -1,9 +1,7 @@
package com.earth2me.essentials.chat;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import java.util.Map;
import org.bukkit.Server;
import org.bukkit.event.player.PlayerChatEvent;

View File

@ -1,6 +1,5 @@
package com.earth2me.essentials.geoip;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Util;
import java.util.logging.Level;

View File

@ -5,27 +5,14 @@ import com.earth2me.essentials.EssentialsConf;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.IUser;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.ChatManager;
import org.jivesoftware.smack.ChatManagerListener;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.Roster.SubscriptionMode;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.StringUtils;