mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-03 18:53:43 +01:00 
			
		
		
		
	Fixes #620
This commit is contained in:
		@@ -26,6 +26,8 @@ import java.sql.ResultSet;
 | 
				
			|||||||
import java.sql.SQLException;
 | 
					import java.sql.SQLException;
 | 
				
			||||||
import java.sql.Statement;
 | 
					import java.sql.Statement;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.intellectualcrafters.plot.PS;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Connects to and uses a MySQL database
 | 
					 * Connects to and uses a MySQL database
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -71,6 +73,7 @@ public class MySQL extends Database {
 | 
				
			|||||||
            return connection;
 | 
					            return connection;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        Class.forName("com.mysql.jdbc.Driver");
 | 
					        Class.forName("com.mysql.jdbc.Driver");
 | 
				
			||||||
 | 
					        PS.debug("jdbc:mysql://" + hostname + ":" + port + "/" + database);
 | 
				
			||||||
        connection = DriverManager.getConnection("jdbc:mysql://" + hostname + ":" + port + "/" + database, user, password);
 | 
					        connection = DriverManager.getConnection("jdbc:mysql://" + hostname + ":" + port + "/" + database, user, password);
 | 
				
			||||||
        return connection;
 | 
					        return connection;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -487,10 +487,10 @@ public class MainUtil {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        final Location top = getPlotTopLoc(plot.world, plot.id);
 | 
					        final Location top = getPlotTopLoc(plot.world, plot.id);
 | 
				
			||||||
        final Location bot = getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
 | 
					        final Location bot = getPlotBottomLoc(plot.world, plot.id).add(1, 0, 1);
 | 
				
			||||||
        final int x = ((top.getX() - bot.getX()) / 2) + bot.getX();
 | 
					        final int x = ((top.getX() - bot.getX()) / 2) + bot.getX();
 | 
				
			||||||
        final int z = bot.getZ() - 1;
 | 
					        final int z = bot.getZ() - 1;
 | 
				
			||||||
        final PlotManager manager = PS.get().getPlotManager(plot.world);
 | 
					        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());
 | 
					        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);
 | 
					        return new Location(plot.world, x, y + 1, z);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user