mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Fix incompatibility between WorldEdit and FAWE for LocalSession#getTool (#1399)
This commit is contained in:
parent
21b6f582e1
commit
971ae04020
@ -1120,6 +1120,24 @@ public class LocalSession implements TextureHolder {
|
||||
//FAWE end
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tool assigned to the item.
|
||||
*
|
||||
* @param item the item type
|
||||
* @return the tool, which may be {@code null}
|
||||
* @deprecated This method is deprecated and only for compatibility with WorldEdit. Use {@link #getTool(BaseItem, Player)}
|
||||
* instead.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
public Tool getTool(ItemType item) {
|
||||
//FAWE start
|
||||
synchronized (this.tools) {
|
||||
return tools.get(item.getInternalId());
|
||||
}
|
||||
//FAWE end
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
@Nullable
|
||||
public Tool getTool(Player player) {
|
||||
|
Loading…
Reference in New Issue
Block a user