Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Get the player's home location
- public Location getHome(Player player)
- {
- long x = 0;
- long y = 0;
- long z = 0;
- World a = null;
- try {
- rs = MCConnection.query("SELECT * FROM "+config.getString("MySQLSettings.Players Table")+" WHERE name='"+player.getName()+"'");
- while (rs.next())
- {
- x = rs.getLong("homex");
- y = rs.getLong("homey");
- z = rs.getLong("homez");
- a = getServer().getWorld(rs.getString("homew"));
- }
- } catch (SQLException ex) {
- Logger.getLogger(Nas.class.getName()).log(Level.SEVERE, null, ex);
- }
- Location loc = new Location(a, x, y, z);
- return loc;
- }
Advertisement
Add Comment
Please, Sign In to add comment