What means can not be resolved to a variable? The condition contains an action that creates the variable Double xco, which is equal to the difference in the coordinates of the players by the "x". In another condition, I call this variable: "If_ (xco <10) {...}" At this stage, an error is generated
@EventHandler public <ChatMessage> void onPlayerChat(AsyncPlayerChatEvent z) { Player p=z.getPlayer(); Location I=p.getLocation(); String a=z.getMessage(); if (a.equals("word")) { for (Player ps : Bukkit.getOnlinePlayers()) { Location i = ps.getLocation(); if (I.getX()<0 && i.getX()<0){ double xco = I.getX() - i.getX();} else if (I.getX()>0 && i.getX()>0 ) { double xco = I.getX() - i.getX();} if (I.getY()<0 && i.getY()<0) { double yco = I.getY() - i.getY();} else if (I.getY()>0 && i.getY()>0 ) { double yco = I.getY() - i.getY();} if (I.getZ()<0 && i.getZ()<0) { double zco = I.getZ() - i.getZ();} else if (I.getZ()>0 && i.getZ()>0 ) { double zco = I.getZ() - i.getZ();} if (xco<10) { ps.playSound(ps.getLocation(), Sound.BLOCK_ANVIL_DESTROY, 1, 5); ps.sendMessage("Test");}