Fix powertool command logging.

This commit is contained in:
KHobbits 2012-08-31 18:52:40 +01:00
parent a4353bc8f2
commit 8c8c6fe73a
3 changed files with 11 additions and 3 deletions

View file

@ -490,12 +490,13 @@ public class Essentials extends JavaPlugin implements IEssentials
{
return (User)base;
}
if (userMap == null) {
if (userMap == null)
{
LOGGER.log(Level.WARNING, "Essentials userMap not initialized");
return null;
}
User user = userMap.getUser(base.getName());
if (user == null)
@ -643,6 +644,7 @@ public class Essentials extends JavaPlugin implements IEssentials
return vanishedPlayers;
}
private static class EssentialsWorldListener implements Listener, Runnable
{
private transient final IEssentials ess;

View file

@ -2,6 +2,8 @@ package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Material;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
@ -16,6 +18,7 @@ import org.bukkit.inventory.ItemStack;
public class EssentialsEntityListener implements Listener
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private final IEssentials ess;
public EssentialsEntityListener(IEssentials ess)
@ -59,6 +62,7 @@ public class EssentialsEntityListener implements Listener
public void run()
{
attacker.getServer().dispatchCommand(attacker.getBase(), command.replaceAll("\\{player\\}", defender.getName()));
LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", attacker.getName(), command));
}
});

View file

@ -1,6 +1,7 @@
package com.earth2me.essentials;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.commands.EssentialsCommand;
import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.TextInput;
@ -469,6 +470,7 @@ public class EssentialsPlayerListener implements Listener
public void run()
{
user.getServer().dispatchCommand(user.getBase(), command);
LOGGER.log(Level.INFO, String.format("[PT] %s issued server command: /%s", user.getName(), command));
}
});
}