[trunk] socialspy fix

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1366 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
ementalo 2011-05-07 23:58:14 +00:00
parent 42971cfad6
commit 7e799276c5
2 changed files with 4 additions and 1 deletions

View File

@ -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 + " ");

View File

@ -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();
}