mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
made changes to the converter
This commit is contained in:
parent
618e2dd211
commit
7a55e8487b
@ -37,6 +37,7 @@ public class PlotMeConverter {
|
|||||||
public void run() {
|
public void run() {
|
||||||
for (World world : Bukkit.getWorlds()) {
|
for (World world : Bukkit.getWorlds()) {
|
||||||
HashMap<String, Plot> plots = PlotManager.getPlots(world);
|
HashMap<String, Plot> plots = PlotManager.getPlots(world);
|
||||||
|
if (plots!=null) {
|
||||||
PlotMain.sendConsoleSenderMessage("Converting " + plots.size() + " plots for '" + world.toString() + "'...");
|
PlotMain.sendConsoleSenderMessage("Converting " + plots.size() + " plots for '" + world.toString() + "'...");
|
||||||
for (Plot plot : plots.values()) {
|
for (Plot plot : plots.values()) {
|
||||||
PlayerList denied = null;
|
PlayerList denied = null;
|
||||||
@ -54,7 +55,6 @@ public class PlotMeConverter {
|
|||||||
fDenied.setAccessible(true);
|
fDenied.setAccessible(true);
|
||||||
added = (PlayerList) fAdded.get(plot);
|
added = (PlayerList) fAdded.get(plot);
|
||||||
denied = (PlayerList) fDenied.get(plot);
|
denied = (PlayerList) fDenied.get(plot);
|
||||||
|
|
||||||
for (Map.Entry<String, UUID> set : added.getAllPlayers().entrySet()) {
|
for (Map.Entry<String, UUID> set : added.getAllPlayers().entrySet()) {
|
||||||
if (set.getKey().equalsIgnoreCase("*") || set.getValue().toString().equalsIgnoreCase("*")) {
|
if (set.getKey().equalsIgnoreCase("*") || set.getValue().toString().equalsIgnoreCase("*")) {
|
||||||
psAdded.add(com.intellectualcrafters.plot.database.DBFunc.everyone);
|
psAdded.add(com.intellectualcrafters.plot.database.DBFunc.everyone);
|
||||||
@ -62,7 +62,6 @@ public class PlotMeConverter {
|
|||||||
}
|
}
|
||||||
psAdded.add(set.getValue());
|
psAdded.add(set.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Map.Entry<String, UUID> set : denied.getAllPlayers().entrySet()) {
|
for (Map.Entry<String, UUID> set : denied.getAllPlayers().entrySet()) {
|
||||||
if (set.getKey().equalsIgnoreCase("*") || set.getValue().toString().equalsIgnoreCase("*")) {
|
if (set.getKey().equalsIgnoreCase("*") || set.getValue().toString().equalsIgnoreCase("*")) {
|
||||||
psDenied.add(com.intellectualcrafters.plot.database.DBFunc.everyone);
|
psDenied.add(com.intellectualcrafters.plot.database.DBFunc.everyone);
|
||||||
@ -82,8 +81,9 @@ public class PlotMeConverter {
|
|||||||
DBFunc.createPlotSettings(DBFunc.getId(world.getName(), pl.id), pl);
|
DBFunc.createPlotSettings(DBFunc.getId(world.getName(), pl.id), pl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlotMain.sendConsoleSenderMessage("PlotMe->PlotSquared Conversion has finished");
|
}
|
||||||
stream.close();
|
stream.close();
|
||||||
|
PlotMain.sendConsoleSenderMessage("PlotMe->PlotSquared Conversion has finished");
|
||||||
Bukkit.getPluginManager().disablePlugin(PlotMeConverter.this.plugin);
|
Bukkit.getPluginManager().disablePlugin(PlotMeConverter.this.plugin);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user