Closed thomasmny closed 3 months ago
Fixes Bug reported on Discord
In 1.20.5, Spigot added the CraftPatternType class which is used to get an EnumBannerPatternType from the banner pattern registry using its Bukkit counterpart.
CraftPatternType
EnumBannerPatternType
Since 1.20.5 contains experimental 1.21 patterns ("flow" & "guster") which are not present on a 1.20.5/6 server, a NoSuchElementException was thrown when attempting to get said patterns from the registry: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/block/banner/CraftPatternType.java#33
NoSuchElementException
This commit attempts to catch not present patterns on startup and removes them from the allPatterns list
allPatterns
Overview
Fixes Bug reported on Discord
Description
In 1.20.5, Spigot added the
CraftPatternType
class which is used to get anEnumBannerPatternType
from the banner pattern registry using its Bukkit counterpart.Since 1.20.5 contains experimental 1.21 patterns ("flow" & "guster") which are not present on a 1.20.5/6 server, a
NoSuchElementException
was thrown when attempting to get said patterns from the registry: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/block/banner/CraftPatternType.java#33This commit attempts to catch not present patterns on startup and removes them from the
allPatterns
listChecklist