mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Fix for inspect command throwing errors when players are in different
worlds
This commit is contained in:
		@@ -47,7 +47,8 @@ public class InspectCommand implements CommandExecutor {
 | 
				
			|||||||
            PlayerProfile PPt = Users.getProfile(target);
 | 
					            PlayerProfile PPt = Users.getProfile(target);
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            //If they are not an Op they have to be close
 | 
					            //If they are not an Op they have to be close
 | 
				
			||||||
            if(sender instanceof Player && !player.isOp() && !m.isNear(player.getLocation(), target.getLocation(), 5.0))
 | 
					            if(sender instanceof Player && !player.getWorld().equals(target.getWorld()) || 
 | 
				
			||||||
 | 
					                    sender instanceof Player && !player.isOp() && !m.isNear(player.getLocation(), target.getLocation(), 5.0))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                sender.sendMessage("You are too far away to inspect that player!"); //TODO: Needs more locale.
 | 
					                sender.sendMessage("You are too far away to inspect that player!"); //TODO: Needs more locale.
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user