diff options
author | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-07 23:58:14 +0000 |
---|---|---|
committer | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-07 23:58:14 +0000 |
commit | 7e799276c5c471e1bfb3caf85ed82ac581036d51 (patch) | |
tree | fa50b4ad929f8c3c4c2418f24ebb2d6893d8a502 | |
parent | 42971cfad6d9989e439e426cca349f64e6bbeb6d (diff) | |
download | Essentials-7e799276c5c471e1bfb3caf85ed82ac581036d51.tar Essentials-7e799276c5c471e1bfb3caf85ed82ac581036d51.tar.gz Essentials-7e799276c5c471e1bfb3caf85ed82ac581036d51.tar.lz Essentials-7e799276c5c471e1bfb3caf85ed82ac581036d51.tar.xz Essentials-7e799276c5c471e1bfb3caf85ed82ac581036d51.zip |
[trunk] socialspy fix
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1366 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 4 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/UserData.java | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index a81457ca0..181d1bfbb 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -12,6 +12,7 @@ import com.earth2me.essentials.commands.NotEnoughArgumentsException; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.bukkit.command.PluginCommand; +import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.scheduler.CraftScheduler; import org.bukkit.entity.Player; import org.bukkit.event.Event.Priority; @@ -306,9 +307,10 @@ public class Essentials extends JavaPlugin public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) { - if ("msg".equals(commandLabel.toLowerCase()) || "mail".equals(commandLabel.toLowerCase()) & sender instanceof Player) + if ("msg".equals(commandLabel.toLowerCase()) || "mail".equals(commandLabel.toLowerCase()) & sender instanceof CraftPlayer) { StringBuilder str = new StringBuilder(); + str.append(commandLabel + " "); for (String a : args) { str.append(a + " "); diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 6a010afcd..82bcc0da0 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -692,6 +692,7 @@ public abstract class UserData extends PlayerExtension implements IConf public void setSocialSpyEnabled(Boolean status) { + isSocialSpyEnabled = status; config.setProperty("socialspy", status); config.save(); } |