Remove FAWE-Piston

Disables a lot of previous functionality in FAWE until replacements can be made. This commit was untested and may cause major issues.
This commit is contained in:
MattBDev
2020-02-05 00:37:42 -05:00
parent 3452fd5a63
commit 75653087b9
46 changed files with 3643 additions and 3867 deletions

View File

@ -41,23 +41,24 @@ public final class BrushCache {
CompoundTag nbt = item.getNbtData();
if (nbt == null) return null;
StringTag json = (StringTag) nbt.getValue().get("weBrushJson");
if (json != null) {
try {
if (RECURSION.get() != null) return null;
RECURSION.set(true);
BrushTool tool = BrushTool.fromString(player, session, json.getValue());
tool.setHolder(item);
brushCache.put(key, tool);
return tool;
} catch (Exception throwable) {
getLogger(BrushCache.class).debug("Invalid brush for " + player + " holding " + item.getType() + ": " + json.getValue(), throwable);
item.setNbtData(null);
brushCache.remove(key);
} finally {
RECURSION.remove();
}
}
// TODO: Ping @MattBDev to reimplement 2020-02-04
// if (json != null) {
// try {
// if (RECURSION.get() != null) return null;
// RECURSION.set(true);
//
// BrushTool tool = BrushTool.fromString(player, session, json.getValue());
// tool.setHolder(item);
// brushCache.put(key, tool);
// return tool;
// } catch (Exception throwable) {
// getLogger(BrushCache.class).debug("Invalid brush for " + player + " holding " + item.getType() + ": " + json.getValue(), throwable);
// item.setNbtData(null);
// brushCache.remove(key);
// } finally {
// RECURSION.remove();
// }
// }
return null;
}