mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Finished linking augmented
This commit is contained in:
parent
435e33d079
commit
1e6db07e3a
@ -50,16 +50,16 @@ public class Setup extends SubCommand {
|
||||
for (Entry<String, ChunkGenerator> entry : SetupUtils.generators.entrySet()) {
|
||||
// + prefix + StringUtils.join(SetupUtils.generators.keySet(), prefix).replaceAll("PlotSquared", "&2PlotSquared")
|
||||
if (entry.getKey().equals("PlotSquared")) {
|
||||
message.append("\n&8 - &2" + entry.getKey() + "(Hybrid Generator)");
|
||||
message.append("\n&8 - &2" + entry.getKey() + " (Hybrid Generator)");
|
||||
}
|
||||
else if (entry.getValue() instanceof HybridGen) {
|
||||
message.append("\n&8 - &7" + entry.getKey() + "(Hybrid Generator)");
|
||||
message.append("\n&8 - &7" + entry.getKey() + " (Hybrid Generator)");
|
||||
}
|
||||
else if (entry.getValue() instanceof PlotGenerator) {
|
||||
message.append("\n&8 - &7" + entry.getKey() + "(Plot Generator)");
|
||||
message.append("\n&8 - &7" + entry.getKey() + " (Plot Generator)");
|
||||
}
|
||||
else {
|
||||
message.append("\n&8 - &7" + entry.getKey() + "(Unknown structure)");
|
||||
message.append("\n&8 - &7" + entry.getKey() + " (Unknown structure)");
|
||||
}
|
||||
}
|
||||
MainUtil.sendMessage(plr, message.toString());
|
||||
@ -159,7 +159,7 @@ public class Setup extends SubCommand {
|
||||
MainUtil.sendMessage(plr, "&7 - You may need to manually configure the other plugin");
|
||||
object.step = ((PlotGenerator) SetupUtils.generators.get(object.plotManager)).getNewPlotWorld(null).getSettingNodes();
|
||||
}
|
||||
MainUtil.sendMessage(plr, "&6What terrain would you like in plots?" + "\n&8 - &2NONE&8 - &7No terrain at all" + "\n&8 - &7ORE&8 - &7Just some ore veins and trees" + "\n&8 - &7ALL&8 - &7Entirely vanilla generation");
|
||||
MainUtil.sendMessage(plr, "&6What terrain would you like in plots?" + "\n&8 - &2NONE&8 - &7No terrain at all" + "\n&8 - &7ORE&8 - &7Just some ore veins and trees" + "\n&8 - &7ROAD&8 - &7Terrain seperated by roads" + "\n&8 - &7ALL&8 - &7Entirely vanilla generation");
|
||||
}
|
||||
object.current++;
|
||||
break;
|
||||
@ -167,7 +167,7 @@ public class Setup extends SubCommand {
|
||||
case 2: { // Choose terrain
|
||||
final List<String> terrain = Arrays.asList(new String[] { "none", "ore", "road", "all" });
|
||||
if ((args.length != 1) || !terrain.contains(args[0].toLowerCase())) {
|
||||
MainUtil.sendMessage(plr, "&cYou must choose the terrain!" + "\n&8 - &2NONE&8 - &7No terrain at all" + "\n&8 - &7ORE&8 - &7Just some ore veins and trees" + "\n&8 - &7ALL&8 - &7Entirely vanilla generation&8 - &7ROAD&8 - &7Vanilla except for roads\n" + "&8 - &7ALL&8 - &7Entirely vanilla generation");
|
||||
MainUtil.sendMessage(plr, "&cYou must choose the terrain!" + "\n&8 - &2NONE&8 - &7No terrain at all" + "\n&8 - &7ORE&8 - &7Just some ore veins and trees" + "\n&8 - &7ROAD&8 - &7Terrain seperated by roads" + "\n&8 - &7ALL&8 - &7Entirely vanilla generation");
|
||||
return false;
|
||||
}
|
||||
object.terrain = terrain.indexOf(args[0].toLowerCase());
|
||||
|
@ -285,7 +285,7 @@ public class SQLManager implements AbstractDB {
|
||||
public String getCreateSQL() {
|
||||
return CREATE_PLOT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setMySQL(PreparedStatement stmt, int i, Plot plot) throws SQLException {
|
||||
stmt.setInt((i * 4) + 1, plot.id.x);
|
||||
@ -340,7 +340,7 @@ public class SQLManager implements AbstractDB {
|
||||
if (subList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
String statement = mod.getCreateMySQL(packet);
|
||||
String statement = mod.getCreateMySQL(subList.size());
|
||||
PreparedStatement stmt = null;
|
||||
try {
|
||||
stmt = this.connection.prepareStatement(statement.toString());
|
||||
@ -352,7 +352,7 @@ public class SQLManager implements AbstractDB {
|
||||
stmt.close();
|
||||
} catch (final Exception e) {
|
||||
try {
|
||||
String unionstmt = mod.getCreateSQLite(packet);
|
||||
String unionstmt = mod.getCreateSQLite(subList.size());
|
||||
stmt = this.connection.prepareStatement(unionstmt.toString());
|
||||
for (int i = 0; i < subList.size(); i++) {
|
||||
mod.setSQLite(stmt, i, subList.get(i));
|
||||
|
@ -458,6 +458,10 @@ public class MainUtil {
|
||||
PlotId id2 = new PlotId(id.x + 1, id.y + 1);
|
||||
Location pos1 = getPlotTopLoc(plot.world, id).add(1, 0, 1);
|
||||
Location pos2 = getPlotBottomLoc(plot.world, id2);
|
||||
pos1.setY(0);
|
||||
pos2.setY(256);
|
||||
System.out.print(pos1);
|
||||
System.out.print(pos2);
|
||||
ChunkManager.manager.regenerateRegion(pos1, pos2, null);
|
||||
}
|
||||
else {
|
||||
@ -472,7 +476,9 @@ public class MainUtil {
|
||||
Location bot = getPlotBottomLocAbs(plot.world, id2);
|
||||
Location top = getPlotTopLocAbs(plot.world, id);
|
||||
Location pos1 = new Location(plot.world, top.getX() + 1, 0, bot.getZ() + 1);
|
||||
Location pos2 = new Location(plot.world, bot.getX(), 0, top.getZ());
|
||||
Location pos2 = new Location(plot.world, bot.getX(), 256, top.getZ());
|
||||
System.out.print(pos1);
|
||||
System.out.print(pos2);
|
||||
ChunkManager.manager.regenerateRegion(pos1, pos2, null);
|
||||
}
|
||||
else {
|
||||
@ -487,7 +493,9 @@ public class MainUtil {
|
||||
Location bot = getPlotBottomLocAbs(plot.world, id2);
|
||||
Location top = getPlotTopLocAbs(plot.world, id);
|
||||
Location pos1 = new Location(plot.world, bot.getX() + 1, 0, top.getZ() + 1);
|
||||
Location pos2 = new Location(plot.world, top.getX(), 0, bot.getZ());
|
||||
Location pos2 = new Location(plot.world, top.getX(), 256, bot.getZ());
|
||||
System.out.print(pos1);
|
||||
System.out.print(pos2);
|
||||
ChunkManager.manager.regenerateRegion(pos1, pos2, null);
|
||||
}
|
||||
else {
|
||||
@ -505,7 +513,6 @@ public class MainUtil {
|
||||
* @param greaterPlot
|
||||
*/
|
||||
public static void mergePlot(final String world, final Plot lesserPlot, final Plot greaterPlot, final boolean removeRoads) {
|
||||
final PlotManager manager = PlotSquared.getPlotManager(world);
|
||||
final PlotWorld plotworld = PlotSquared.getPlotWorld(world);
|
||||
if (lesserPlot.id.x.equals(greaterPlot.id.x)) {
|
||||
if (!lesserPlot.settings.getMerged(2)) {
|
||||
|
@ -293,11 +293,8 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
@Override
|
||||
public void run() {
|
||||
long start = System.currentTimeMillis();
|
||||
int allocated = SetBlockQueue.getAllocate();
|
||||
SetBlockQueue.allocate(0);
|
||||
while (System.currentTimeMillis() - start < allocated) {
|
||||
while (System.currentTimeMillis() - start < 20) {
|
||||
if (chunks.size() == 0) {
|
||||
SetBlockQueue.allocate(SetBlockQueue.getAllocate() + allocated);
|
||||
TaskManager.runTaskLater(whenDone, 1);
|
||||
Bukkit.getScheduler().cancelTask(TaskManager.tasks.get(currentIndex));
|
||||
TaskManager.tasks.remove(currentIndex);
|
||||
@ -313,7 +310,6 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
final boolean result = chunk.load(false);
|
||||
if (!result) {
|
||||
loaded = false;
|
||||
;
|
||||
}
|
||||
if (!chunk.isLoaded()) {
|
||||
loaded = false;
|
||||
|
Loading…
Reference in New Issue
Block a user