3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00

Fix incompatibility between WorldEdit and FAWE for LocalSession#getTool (#1399)

Dieser Commit ist enthalten in:
Lilly Tempest 2021-11-04 21:29:40 +01:00 committet von GitHub
Ursprung 21b6f582e1
Commit 971ae04020
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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) {