mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
parent
ae39f7bba3
commit
26e3e56988
@ -1066,13 +1066,13 @@ public class LocalSession implements TextureHolder {
|
|||||||
private transient boolean loadDefaults = true;
|
private transient boolean loadDefaults = true;
|
||||||
|
|
||||||
public Tool getTool(BaseItem item, Player player) {
|
public Tool getTool(BaseItem item, Player player) {
|
||||||
|
loadDefaults(player, false);
|
||||||
if (Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES && item.getNativeItem() != null) {
|
if (Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES && item.getNativeItem() != null) {
|
||||||
BrushTool tool = BrushCache.getTool(player, this, item);
|
BrushTool tool = BrushCache.getTool(player, this, item);
|
||||||
if (tool != null) {
|
if (tool != null) {
|
||||||
return tool;
|
return tool;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadDefaults(player, false);
|
|
||||||
return getTool(item.getType());
|
return getTool(item.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1122,6 +1122,9 @@ public class LocalSession implements TextureHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BrushTool getBrushTool(BaseItem item, Player player, boolean create) throws InvalidToolBindException {
|
public BrushTool getBrushTool(BaseItem item, Player player, boolean create) throws InvalidToolBindException {
|
||||||
|
if (item.getType().hasBlockType()) {
|
||||||
|
throw new InvalidToolBindException(item.getType(), "Blocks can't be used");
|
||||||
|
}
|
||||||
Tool tool = getTool(item, player);
|
Tool tool = getTool(item, player);
|
||||||
if (!(tool instanceof BrushTool)) {
|
if (!(tool instanceof BrushTool)) {
|
||||||
if (create) {
|
if (create) {
|
||||||
|
Loading…
Reference in New Issue
Block a user