mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
[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:
parent
42971cfad6
commit
7e799276c5
@ -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 + " ");
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user