Removed PlotMe converting features.

Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
This commit is contained in:
matt
2019-01-15 22:19:29 -05:00
parent 0e0a534620
commit 0817d7de5a
9 changed files with 70 additions and 1039 deletions

View File

@ -230,14 +230,6 @@ public interface IPlotMain extends ILogger {
*/
InventoryUtil initInventoryUtil();
/**
* Run the converter for the implementation (not necessarily PlotMe, just
* any plugin that we can convert from).
*
* @return
*/
boolean initPlotMeConverter();
/**
* Unregister a PlotPlayer from cache e.g. if they have logged off.
*

View File

@ -171,7 +171,6 @@ import java.util.zip.ZipInputStream;
// Start these separately
UUIDHandler.add(new StringWrapper("*"), DBFunc.EVERYONE);
startExpiryTasks();
startPlotMeConversion();
}
// create event util class
EventUtil.manager = this.IMP.initEventUtil();
@ -359,7 +358,6 @@ import java.util.zip.ZipInputStream;
}
});
startExpiryTasks();
startPlotMeConversion();
}
});
}
@ -377,28 +375,6 @@ import java.util.zip.ZipInputStream;
}
}
private void startPlotMeConversion() {
if (Settings.Enabled_Components.PLOTME_CONVERTER || Settings.PlotMe.CACHE_UUDS) {
TaskManager.IMP.taskAsync(new Runnable() {
@Override public void run() {
if (PlotSquared.this.IMP.initPlotMeConverter()) {
PlotSquared.log("&c=== IMPORTANT ===");
PlotSquared.log(
"&cTHIS MESSAGE MAY BE EXTREMELY HELPFUL IF YOU HAVE TROUBLE CONVERTING PlotMe!");
PlotSquared
.log("&c - Make sure 'UUID.read-from-disk' is disabled (false)!");
PlotSquared.log(
"&c - Sometimes the database can be locked, deleting PlotMe.jar beforehand will fix the issue!");
PlotSquared.log(
"&c - After the conversion is finished, please set 'plotme-converter' to false in the "
+ "'settings.yml'");
}
Settings.Enabled_Components.PLOTME_CONVERTER = false;
}
});
}
}
public boolean isMainThread(Thread thread) {
return this.thread == thread;
}

View File

@ -54,11 +54,6 @@ public class Settings extends Config {
Redstone.DISABLE_UNOCCUPIED = config
.getBoolean("protection.redstone.disable-unoccupied", Redstone.DISABLE_UNOCCUPIED);
// PlotMe
Enabled_Components.PLOTME_CONVERTER =
config.getBoolean("plotme-convert.enabled", Enabled_Components.PLOTME_CONVERTER);
PlotMe.CACHE_UUDS = config.getBoolean("plotme-convert.cache-uuids", PlotMe.CACHE_UUDS);
// UUID
UUID.USE_SQLUUIDHANDLER =
config.getBoolean("uuid.use_sqluuidhandler", UUID.USE_SQLUUIDHANDLER);
@ -272,13 +267,6 @@ public class Settings extends Config {
MAX_PLOTS = 127;
}
@Comment("Switching from PlotMe?") public static final class PlotMe {
@Comment("Cache the uuids from the PlotMe database") public static boolean CACHE_UUDS =
false;
}
public static final class Confirmation {
@Comment("Teleport to your plot on death") public static int CONFIRMATION_TIMEOUT_SECONDS =
20;
@ -331,8 +319,6 @@ public class Settings extends Config {
@Comment("Optimizes block changing code") public static boolean BLOCK_CACHE = true;
@Comment("Getting a rating won't need the database") public static boolean RATING_CACHE =
true;
@Comment("The converter will attempt to convert the PlotMe database") public static boolean
PLOTME_CONVERTER = true;
@Comment("Allow WorldEdit to be restricted to plots") public static boolean
WORLDEDIT_RESTRICTIONS = true;
@Comment("Allow economy to be used") public static boolean ECONOMY = true;

View File

@ -142,7 +142,7 @@ public abstract class UUIDHandlerImplementation {
UUID offlineUpper = UUID.nameUUIDFromBytes(
("OfflinePlayer:" + name.value).getBytes(Charsets.UTF_8));
if (UUIDHandlerImplementation.this.unknown.contains(offlineUpper)
&& offlineUpper != null && !offlineUpper.equals(uuid)) {
&& !offlineUpper.equals(uuid)) {
UUIDHandlerImplementation.this.unknown.remove(offlineUpper);
Set<Plot> plots = PlotSquared.get().getPlotsAbs(offlineUpper);
if (!plots.isEmpty()) {