3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-443: Synchronize access to HANDLED_TAGS as Spigot uses it async

Dieser Commit ist enthalten in:
BuildTools 2015-01-18 17:33:13 +00:00
Ursprung 59dd2ddb9d
Commit 17962f66ec

Datei anzeigen

@ -691,26 +691,28 @@ class CraftMetaItem implements ItemMeta, Repairable {
} }
public static Set<String> getHandledTags() { public static Set<String> getHandledTags() {
if (HANDLED_TAGS.isEmpty()) { synchronized (HANDLED_TAGS) {
HANDLED_TAGS.addAll(Arrays.asList( if (HANDLED_TAGS.isEmpty()) {
DISPLAY.NBT, HANDLED_TAGS.addAll(Arrays.asList(
REPAIR.NBT, DISPLAY.NBT,
ATTRIBUTES.NBT, REPAIR.NBT,
ENCHANTMENTS.NBT, ATTRIBUTES.NBT,
CraftMetaMap.MAP_SCALING.NBT, ENCHANTMENTS.NBT,
CraftMetaPotion.POTION_EFFECTS.NBT, CraftMetaMap.MAP_SCALING.NBT,
CraftMetaSkull.SKULL_OWNER.NBT, CraftMetaPotion.POTION_EFFECTS.NBT,
CraftMetaTileEntity.BLOCK_ENTITY_TAG.NBT, CraftMetaSkull.SKULL_OWNER.NBT,
CraftMetaBook.BOOK_TITLE.NBT, CraftMetaTileEntity.BLOCK_ENTITY_TAG.NBT,
CraftMetaBook.BOOK_AUTHOR.NBT, CraftMetaBook.BOOK_TITLE.NBT,
CraftMetaBook.BOOK_PAGES.NBT, CraftMetaBook.BOOK_AUTHOR.NBT,
CraftMetaBook.RESOLVED.NBT, CraftMetaBook.BOOK_PAGES.NBT,
CraftMetaBook.GENERATION.NBT, CraftMetaBook.RESOLVED.NBT,
CraftMetaFirework.FIREWORKS.NBT, CraftMetaBook.GENERATION.NBT,
CraftMetaEnchantedBook.STORED_ENCHANTMENTS.NBT, CraftMetaFirework.FIREWORKS.NBT,
CraftMetaCharge.EXPLOSION.NBT CraftMetaEnchantedBook.STORED_ENCHANTMENTS.NBT,
)); CraftMetaCharge.EXPLOSION.NBT
));
}
return HANDLED_TAGS;
} }
return HANDLED_TAGS;
} }
} }