mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fix persistent brushes
This commit is contained in:
@ -38,7 +38,9 @@ public final class BrushCache {
|
||||
BrushTool cached = brushCache.get(key);
|
||||
if (cached != null) return cached;
|
||||
|
||||
StringTag json = (StringTag) item.getNbtData().getValue().get("weBrushJson");
|
||||
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;
|
||||
|
@ -957,7 +957,7 @@ public class LocalSession implements TextureHolder {
|
||||
}
|
||||
|
||||
public Tool getTool(BaseItem item, Player player) {
|
||||
if (item.getNativeItem() != null && Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES) {
|
||||
if (Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES && item.getNativeItem() != null) {
|
||||
BrushTool tool = BrushCache.getTool(player, this, item);
|
||||
if (tool != null) return tool;
|
||||
}
|
||||
@ -1034,7 +1034,7 @@ public class LocalSession implements TextureHolder {
|
||||
throw new InvalidToolBindException(type, "Already used for the navigation wand");
|
||||
}
|
||||
Tool previous;
|
||||
if (player != null && (tool instanceof BrushTool || tool == null) && item.getNativeItem() != null && Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES) {
|
||||
if (player != null && (tool instanceof BrushTool || tool == null) && Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES && item.getNativeItem() != null) {
|
||||
previous = BrushCache.getCachedTool(item);
|
||||
if (tool != null) {
|
||||
BrushCache.setTool(item, (BrushTool) tool);
|
||||
|
@ -168,8 +168,8 @@ public class SchematicCommands extends MethodCommands {
|
||||
|
||||
@Command(
|
||||
aliases = {"remap"},
|
||||
help = "Remap a clipboard between MCPE/PC values\n",
|
||||
desc = "Remap a clipboard between MCPE/PC values\n"
|
||||
help = "Remap a clipboard between MCPE/PC values",
|
||||
desc = "Remap a clipboard between MCPE/PC values"
|
||||
)
|
||||
@Deprecated
|
||||
@CommandPermissions({"worldedit.schematic.remap"})
|
||||
|
@ -1 +1 @@
|
||||
version=${version}
|
||||
version=${internalVersion}
|
||||
|
Reference in New Issue
Block a user