mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-08-26 23:19:47 +02:00
Fixes #620
This commit is contained in:
parent
5137b23357
commit
91bfcd0deb
|
@ -26,6 +26,8 @@ import java.sql.ResultSet;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
|
||||
/**
|
||||
* Connects to and uses a MySQL database
|
||||
*
|
||||
|
@ -71,6 +73,7 @@ public class MySQL extends Database {
|
|||
return connection;
|
||||
}
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
PS.debug("jdbc:mysql://" + hostname + ":" + port + "/" + database);
|
||||
connection = DriverManager.getConnection("jdbc:mysql://" + hostname + ":" + port + "/" + database, user, password);
|
||||
return connection;
|
||||
}
|
||||
|
|
|
@ -487,10 +487,10 @@ public class MainUtil {
|
|||
final Location top = getPlotTopLoc(plot.world, plot.id);
|
||||
final Location bot = getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
|
||||
final int x = ((top.getX() - bot.getX()) / 2) + bot.getX();
|
||||
final int z = bot.getZ();
|
||||
final int z = bot.getZ() - 1;
|
||||
final PlotManager manager = PS.get().getPlotManager(plot.world);
|
||||
final int y = Math.max(getHeighestBlock(plot.world, x, z), manager.getSignLoc(PS.get().getPlotWorld(plot.world), plot).getY());
|
||||
return new Location(plot.world, x, y + 1, z - 1);
|
||||
return new Location(plot.world, x, y + 1, z);
|
||||
}
|
||||
|
||||
public static boolean teleportPlayer(final PlotPlayer player, final Location from, final Plot plot) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user