mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03: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.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 x = ((top.getX() - bot.getX()) / 2) + bot.getX();
 | 
			
		||||
        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());
 | 
			
		||||
        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);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user