mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
More code cleanup.
This commit is contained in:
parent
11f02fb947
commit
2e0fb15952
@ -2,7 +2,6 @@ package com.earth2me.essentials.commands;
|
|||||||
|
|
||||||
import com.earth2me.essentials.Mob;
|
import com.earth2me.essentials.Mob;
|
||||||
import com.earth2me.essentials.Mob.MobException;
|
import com.earth2me.essentials.Mob.MobException;
|
||||||
import com.earth2me.essentials.TargetBlock;
|
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -73,7 +72,8 @@ public class Commandspawnmob extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
8, 9
|
8, 9
|
||||||
};
|
};
|
||||||
Block block = (new TargetBlock(user, 300, 0.2, ignore)).getTargetBlock();
|
|
||||||
|
final Block block = Util.getTarget(user).getBlock();
|
||||||
if (block == null)
|
if (block == null)
|
||||||
{
|
{
|
||||||
throw new Exception(Util.i18n("unableToSpawnMob"));
|
throw new Exception(Util.i18n("unableToSpawnMob"));
|
||||||
|
@ -86,11 +86,7 @@ public class Commandtime extends EssentialsCommand
|
|||||||
world.setTime(time + 24000 + ticks);
|
world.setTime(time + 24000 + ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inform the sender of the change
|
|
||||||
//sender.sendMessage("");
|
|
||||||
|
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
boolean first = true;
|
|
||||||
for (World world : worlds)
|
for (World world : worlds)
|
||||||
{
|
{
|
||||||
if (msg.length() > 0)
|
if (msg.length() > 0)
|
||||||
|
@ -284,6 +284,7 @@ public class SignTrade extends EssentialsSign
|
|||||||
if (split.length == 3)
|
if (split.length == 3)
|
||||||
{
|
{
|
||||||
final int stackamount = getIntegerPositive(split[0]);
|
final int stackamount = getIntegerPositive(split[0]);
|
||||||
|
//TODO: Unused local variable
|
||||||
final ItemStack item = getItemStack(split[1], stackamount, ess);
|
final ItemStack item = getItemStack(split[1], stackamount, ess);
|
||||||
final int amount = getInteger(split[2]);
|
final int amount = getInteger(split[2]);
|
||||||
final String newline = stackamount + " " + split[1] + ":" + (amount + Math.round(value));
|
final String newline = stackamount + " " + split[1] + ":" + (amount + Math.round(value));
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package com.earth2me.essentials.chat;
|
package com.earth2me.essentials.chat;
|
||||||
|
|
||||||
import com.earth2me.essentials.ChargeException;
|
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.PlayerChatEvent;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.earth2me.essentials.geoip;
|
package com.earth2me.essentials.geoip;
|
||||||
|
|
||||||
import com.earth2me.essentials.Essentials;
|
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
@ -5,27 +5,14 @@ import com.earth2me.essentials.EssentialsConf;
|
|||||||
import com.earth2me.essentials.IConf;
|
import com.earth2me.essentials.IConf;
|
||||||
import com.earth2me.essentials.IUser;
|
import com.earth2me.essentials.IUser;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
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.logging.Handler;
|
import java.util.logging.Handler;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.LogRecord;
|
import java.util.logging.LogRecord;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.entity.Player;
|
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.Roster.SubscriptionMode;
|
||||||
import org.jivesoftware.smack.XMPPConnection;
|
import org.jivesoftware.smack.*;
|
||||||
import org.jivesoftware.smack.XMPPException;
|
|
||||||
import org.jivesoftware.smack.packet.Message;
|
import org.jivesoftware.smack.packet.Message;
|
||||||
import org.jivesoftware.smack.packet.Presence;
|
import org.jivesoftware.smack.packet.Presence;
|
||||||
import org.jivesoftware.smack.util.StringUtils;
|
import org.jivesoftware.smack.util.StringUtils;
|
||||||
|
Loading…
Reference in New Issue
Block a user