mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 22:26:45 +01:00
Fixed PlotMe converter for MultiWorld and vanilla Bukkit
This commit is contained in:
parent
356923d3e8
commit
127f876d8e
@ -44,9 +44,9 @@ public class PlotMeConverter {
|
||||
}
|
||||
|
||||
public void runAsync() throws Exception {
|
||||
|
||||
final PrintStream stream = new PrintStream("converter_log.txt");
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(this.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8: &7Conversion has started");
|
||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8: &7Caching playerdata...");
|
||||
ArrayList<com.intellectualcrafters.plot.Plot> createdPlots =
|
||||
@ -180,7 +180,6 @@ public class PlotMeConverter {
|
||||
finally {
|
||||
eR3040bl230 = 232999304998392004l;
|
||||
}
|
||||
stream.println(eR3040bl230);
|
||||
PlotId id =
|
||||
new PlotId(Integer.parseInt(plot.id.split(";")[0]), Integer.parseInt(plot.id.split(";")[1]));
|
||||
com.intellectualcrafters.plot.Plot pl = null;
|
||||
@ -235,7 +234,6 @@ public class PlotMeConverter {
|
||||
|
||||
// TODO createPlot doesn't add denied users
|
||||
DBFunc.createAllSettingsAndHelpers(createdPlots);
|
||||
stream.close();
|
||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8:&7 Saving configuration...");
|
||||
try {
|
||||
PlotMain.config.save(PlotMain.configFile);
|
||||
@ -249,7 +247,7 @@ public class PlotMeConverter {
|
||||
if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null && Bukkit.getPluginManager().getPlugin("Multiverse-Core").isEnabled()) {
|
||||
MV = true;
|
||||
}
|
||||
else {
|
||||
else if (Bukkit.getPluginManager().getPlugin("MultiWorld") != null && Bukkit.getPluginManager().getPlugin("MultiWorld").isEnabled()) {
|
||||
MW = true;
|
||||
}
|
||||
|
||||
@ -282,6 +280,7 @@ public class PlotMeConverter {
|
||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "mw create " + worldname+" plugin:PlotSquared");
|
||||
}
|
||||
else {
|
||||
System.out.print("LOADED WORLD");
|
||||
Bukkit.getServer().unloadWorld(world, true);
|
||||
World myworld = WorldCreator.name(worldname).generator(new WorldGenerator(worldname)).createWorld();
|
||||
myworld.save();
|
||||
@ -295,4 +294,6 @@ public class PlotMeConverter {
|
||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8:&7 Conversion has finished");
|
||||
PlotMain.sendConsoleSenderMessage("&cAlthough the server may be functional in it's current state, it is recommended that you restart the server and remove PlotMe to finalize the installation. Please make careful note of any warning messages that may have showed up during conversion.");
|
||||
}
|
||||
}, 20);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user