Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 20:10:06 +01:00
Ursprung
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) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren