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 {
|
public void runAsync() throws Exception {
|
||||||
|
Bukkit.getScheduler().runTaskLater(this.plugin, new Runnable() {
|
||||||
final PrintStream stream = new PrintStream("converter_log.txt");
|
@Override
|
||||||
|
public void run() {
|
||||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8: &7Conversion has started");
|
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8: &7Conversion has started");
|
||||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8: &7Caching playerdata...");
|
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8: &7Caching playerdata...");
|
||||||
ArrayList<com.intellectualcrafters.plot.Plot> createdPlots =
|
ArrayList<com.intellectualcrafters.plot.Plot> createdPlots =
|
||||||
@ -180,7 +180,6 @@ public class PlotMeConverter {
|
|||||||
finally {
|
finally {
|
||||||
eR3040bl230 = 232999304998392004l;
|
eR3040bl230 = 232999304998392004l;
|
||||||
}
|
}
|
||||||
stream.println(eR3040bl230);
|
|
||||||
PlotId id =
|
PlotId id =
|
||||||
new PlotId(Integer.parseInt(plot.id.split(";")[0]), Integer.parseInt(plot.id.split(";")[1]));
|
new PlotId(Integer.parseInt(plot.id.split(";")[0]), Integer.parseInt(plot.id.split(";")[1]));
|
||||||
com.intellectualcrafters.plot.Plot pl = null;
|
com.intellectualcrafters.plot.Plot pl = null;
|
||||||
@ -235,7 +234,6 @@ public class PlotMeConverter {
|
|||||||
|
|
||||||
// TODO createPlot doesn't add denied users
|
// TODO createPlot doesn't add denied users
|
||||||
DBFunc.createAllSettingsAndHelpers(createdPlots);
|
DBFunc.createAllSettingsAndHelpers(createdPlots);
|
||||||
stream.close();
|
|
||||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8:&7 Saving configuration...");
|
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8:&7 Saving configuration...");
|
||||||
try {
|
try {
|
||||||
PlotMain.config.save(PlotMain.configFile);
|
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()) {
|
if (Bukkit.getPluginManager().getPlugin("Multiverse-Core") != null && Bukkit.getPluginManager().getPlugin("Multiverse-Core").isEnabled()) {
|
||||||
MV = true;
|
MV = true;
|
||||||
}
|
}
|
||||||
else {
|
else if (Bukkit.getPluginManager().getPlugin("MultiWorld") != null && Bukkit.getPluginManager().getPlugin("MultiWorld").isEnabled()) {
|
||||||
MW = true;
|
MW = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,6 +280,7 @@ public class PlotMeConverter {
|
|||||||
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "mw create " + worldname+" plugin:PlotSquared");
|
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "mw create " + worldname+" plugin:PlotSquared");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
System.out.print("LOADED WORLD");
|
||||||
Bukkit.getServer().unloadWorld(world, true);
|
Bukkit.getServer().unloadWorld(world, true);
|
||||||
World myworld = WorldCreator.name(worldname).generator(new WorldGenerator(worldname)).createWorld();
|
World myworld = WorldCreator.name(worldname).generator(new WorldGenerator(worldname)).createWorld();
|
||||||
myworld.save();
|
myworld.save();
|
||||||
@ -295,4 +294,6 @@ public class PlotMeConverter {
|
|||||||
PlotMain.sendConsoleSenderMessage("&3PlotMe&8->&3PlotSquared&8:&7 Conversion has finished");
|
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.");
|
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