mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Fix plot chat, chatspy + add comment spying
This commit is contained in:
		@@ -32,6 +32,7 @@ import com.intellectualcrafters.plot.object.comment.PlotComment;
 | 
			
		||||
import com.intellectualcrafters.plot.util.CommentManager;
 | 
			
		||||
import com.intellectualcrafters.plot.util.MainUtil;
 | 
			
		||||
import com.intellectualcrafters.plot.util.StringMan;
 | 
			
		||||
import com.intellectualcrafters.plot.util.UUIDHandler;
 | 
			
		||||
import com.plotsquared.general.commands.CommandDeclaration;
 | 
			
		||||
 | 
			
		||||
@CommandDeclaration(
 | 
			
		||||
@@ -83,6 +84,11 @@ public class Comment extends SubCommand {
 | 
			
		||||
            sendMessage(player, C.COMMENT_SYNTAX, StringMan.join(CommentManager.inboxes.keySet(),"|"));
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        for (PlotPlayer pp : UUIDHandler.getPlayers().values()) {
 | 
			
		||||
            if (pp.getAttribute("chatspy")) {
 | 
			
		||||
                MainUtil.sendMessage(pp, "/plot comment " + StringMan.join(args, " "));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        sendMessage(player, C.COMMENT_ADDED);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -83,10 +83,10 @@ public class Toggle extends SubCommand {
 | 
			
		||||
                @Override
 | 
			
		||||
                public boolean onCommand(PlotPlayer player, String[] args) {
 | 
			
		||||
                    if (toggle(player, "chatspy")) {
 | 
			
		||||
                        MainUtil.sendMessage(player, C.TOGGLE_ENABLED, getCommand());
 | 
			
		||||
                        MainUtil.sendMessage(player, C.TOGGLE_DISABLED, getCommand());
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        MainUtil.sendMessage(player, C.TOGGLE_DISABLED, getCommand());
 | 
			
		||||
                        MainUtil.sendMessage(player, C.TOGGLE_ENABLED, getCommand());
 | 
			
		||||
                    }
 | 
			
		||||
                    return true;
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,7 @@ import com.intellectualcrafters.plot.util.ChunkManager;
 | 
			
		||||
import com.intellectualcrafters.plot.util.ClusterManager;
 | 
			
		||||
import com.intellectualcrafters.plot.util.MainUtil;
 | 
			
		||||
import com.intellectualcrafters.plot.util.SchematicHandler;
 | 
			
		||||
import com.intellectualcrafters.plot.util.StringMan;
 | 
			
		||||
import com.intellectualcrafters.plot.util.TaskManager;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -948,7 +949,7 @@ public class Plot {
 | 
			
		||||
        if (this.hashCode() != other.hashCode()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return ((this.id.x.equals(other.id.x)) && (this.id.y.equals(other.id.y)) && (this.world.equals(other.world)));
 | 
			
		||||
        return ((this.id.x.equals(other.id.x)) && (this.id.y.equals(other.id.y)) && (StringMan.isEqual(this.world, other.world)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user