summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-07 23:58:14 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-07 23:58:14 +0000
commit7cb6e969afbd436a5d50fa370c199e62fe18ce1b (patch)
tree433005063ab34aadcf7c77e3e62e83e617fab2e4
parent9efa54fbc337935665c3f2f8784f8472b3116f42 (diff)
downloadEssentials-7cb6e969afbd436a5d50fa370c199e62fe18ce1b.tar
Essentials-7cb6e969afbd436a5d50fa370c199e62fe18ce1b.tar.gz
Essentials-7cb6e969afbd436a5d50fa370c199e62fe18ce1b.tar.lz
Essentials-7cb6e969afbd436a5d50fa370c199e62fe18ce1b.tar.xz
Essentials-7cb6e969afbd436a5d50fa370c199e62fe18ce1b.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.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();
}