public static JumpPort getPort(Location loc) { Collection<JumpPort> jports = ports.values(); int x = loc.getBlockX(); int y = loc.getBlockY(); int z = loc.getBlockZ(); for (JumpPort port : jports) { if (port.hasBlock(x, y, z)) { return port; } } return null; }
public static boolean isInPort(Location loc) { Collection<JumpPort> jports = ports.values(); int x = loc.getBlockX(); int y = loc.getBlockY(); int z = loc.getBlockZ(); for (JumpPort port : jports) { if (port.hasBlock(x, y, z)) { return true; } } return false; }