Fixed generation (which I broke) + Made conversion messages more straightforward.

This commit is contained in:
boy0001 2015-06-11 09:18:40 +10:00
parent 1815fb09b3
commit 7d9963d386
7 changed files with 7 additions and 17 deletions

View File

@ -8,7 +8,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<artifactId>PlotSquared</artifactId> <artifactId>PlotSquared</artifactId>
<version>2.11.18</version>
<name>PlotSquared</name> <name>PlotSquared</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<build> <build>

View File

@ -353,7 +353,6 @@ public class SQLManager implements AbstractDB {
if (subList.size() != last || (count % 5000 == 0 && count > 0)) { if (subList.size() != last || (count % 5000 == 0 && count > 0)) {
preparedStmt.executeBatch(); preparedStmt.executeBatch();
preparedStmt.close(); preparedStmt.close();
statement = mod.getCreateMySQL(subList.size()); statement = mod.getCreateMySQL(subList.size());
preparedStmt = this.connection.prepareStatement(statement.toString()); preparedStmt = this.connection.prepareStatement(statement.toString());
} }
@ -377,7 +376,6 @@ public class SQLManager implements AbstractDB {
PlotSquared.log("&cERROR 1: " + " | " + objList.get(0).getClass().getCanonicalName()); PlotSquared.log("&cERROR 1: " + " | " + objList.get(0).getClass().getCanonicalName());
} }
} }
try { try {
int count = 0; int count = 0;
PreparedStatement preparedStmt = null; PreparedStatement preparedStmt = null;

View File

@ -241,6 +241,10 @@ public class LikePlotMeConverter {
@Override @Override
public void run() { public void run() {
sendMessage("&aDatabase conversion is now complete!"); sendMessage("&aDatabase conversion is now complete!");
PlotSquared.log("&c - Stop the server");
PlotSquared.log("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml");
PlotSquared.log("&c - Correct any generator settings that haven't copied to 'settings.yml' properly");
PlotSquared.log("&c - Start the server");
PlotSquared.setAllPlotsRaw(DBFunc.getPlots()); PlotSquared.setAllPlotsRaw(DBFunc.getPlots());
} }
}); });
@ -300,11 +304,7 @@ public class LikePlotMeConverter {
} catch (final Exception e) { } catch (final Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
sendMessage("&cPlease wait until database conversion is complete. You will be notified when this happens"); sendMessage("&cPlease wait until database conversion is complete. You will be notified with instructions when this happens!");
PlotSquared.log("&c - Stop the server");
PlotSquared.log("&c - Disable 'plotme-convert.enabled' and 'plotme-convert.cache-uuids' in the settings.yml");
PlotSquared.log("&c - Correct any generator settings that haven't copied to 'settings.yml' properly");
PlotSquared.log("&c - Start the server");
} }
}); });
} catch (final Exception e) { } catch (final Exception e) {

View File

@ -151,13 +151,11 @@ public class HybridPlotWorld extends ClassicPlotWorld {
} }
} }
} }
this.ROAD_SCHEMATIC_ENABLED = true;
if ((schem1 == null) || (schem2 == null) || (this.ROAD_WIDTH == 0)) { if ((schem1 == null) || (schem2 == null) || (this.ROAD_WIDTH == 0)) {
PlotSquared.log(C.PREFIX.s() + "&3 - schematic: &7false"); PlotSquared.log(C.PREFIX.s() + "&3 - schematic: &7false");
return; return;
} }
this.ROAD_SCHEMATIC_ENABLED = true;
// Do not populate road if using schematic population // Do not populate road if using schematic population
this.ROAD_BLOCK = new PlotBlock(this.ROAD_BLOCK.id, (byte) 0); this.ROAD_BLOCK = new PlotBlock(this.ROAD_BLOCK.id, (byte) 0);
final DataCollection[] blocks1 = schem1.getBlockCollection(); final DataCollection[] blocks1 = schem1.getBlockCollection();

View File

@ -11,5 +11,4 @@ public abstract class EconHandler {
public abstract void depositMoney(PlotPlayer player, double amount); public abstract void depositMoney(PlotPlayer player, double amount);
public abstract void depositMoney(OfflinePlotPlayer player, double amount); public abstract void depositMoney(OfflinePlotPlayer player, double amount);
public abstract void setPermission(PlotPlayer player, String perm, boolean value); public abstract void setPermission(PlotPlayer player, String perm, boolean value);
public abstract boolean getPermission(PlotPlayer player, String perm);
} }

View File

@ -97,6 +97,7 @@ public class BukkitChunkManager extends ChunkManager {
@Override @Override
public void regenerateChunk(String world, ChunkLoc loc) { public void regenerateChunk(String world, ChunkLoc loc) {
World worldObj = Bukkit.getWorld(world); World worldObj = Bukkit.getWorld(world);
// Chunk chunk = worldObj.getChunkAt(loc.x, loc.z);
worldObj.regenerateChunk(loc.x, loc.z); worldObj.regenerateChunk(loc.x, loc.z);
for (final Player player : worldObj.getPlayers()) { for (final Player player : worldObj.getPlayers()) {
org.bukkit.Location locObj = player.getLocation(); org.bukkit.Location locObj = player.getLocation();

View File

@ -73,9 +73,4 @@ public class BukkitEconHandler extends EconHandler {
perms.playerRemove(((BukkitPlayer) player).player, perm); perms.playerRemove(((BukkitPlayer) player).player, perm);
} }
} }
@Override
public boolean getPermission(PlotPlayer player, String perm) {
return player.hasPermission(perm);
}
} }