Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean LocationTest(Player player, World world) throws SQLException {
- Location locatie = new Location(player.getWorld(), 0, 0, 0);
- String worldSt = world.getName();
- String worldname = "";
- String uuid = player.getUniqueId().toString();
- if (worldSt == "survival") {
- worldname = "survival_loc_store";
- } else if (worldSt == "ASkyBlock") {
- worldname = "skyblock_loc_store";
- }
- // getting the location of the player if he was in these worlds
- PreparedStatement statX = plugin.connection
- .prepareStatement("SELECT locX FROM revent." + worldname + " WHERE name = ?;");
- statX.setString(1, uuid);
- locatie.setX(Double.parseDouble(statX.executeQuery().getString(1)));
- if (locatie == new Location(player.getWorld(), 0, 0, 0)) {
- return false;
- } else
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement