summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java1
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();
}