mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 19:06:41 +00:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user