diff options
3 files changed, 11 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index e17865b4e..3d8df2801 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -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; diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index c7f7cf051..c43cc8e31 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -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)); } }); diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 96e5a6796..0490125bc 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -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)); } }); } |