mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-28 09:17:21 +01:00
SPIGOT-443: Synchronize access to HANDLED_TAGS as Spigot uses it async
This commit is contained in:
parent
59dd2ddb9d
commit
17962f66ec
1 changed files with 22 additions and 20 deletions
|
@ -691,6 +691,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Set<String> getHandledTags() {
|
public static Set<String> getHandledTags() {
|
||||||
|
synchronized (HANDLED_TAGS) {
|
||||||
if (HANDLED_TAGS.isEmpty()) {
|
if (HANDLED_TAGS.isEmpty()) {
|
||||||
HANDLED_TAGS.addAll(Arrays.asList(
|
HANDLED_TAGS.addAll(Arrays.asList(
|
||||||
DISPLAY.NBT,
|
DISPLAY.NBT,
|
||||||
|
@ -714,3 +715,4 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||||
return HANDLED_TAGS;
|
return HANDLED_TAGS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue