Description
addToSet and removeFromSet call getOrCreateSet() before checking the registered type, so passing an INT/LONG/etc. statistic key produces a ClassCastException instead of a clear error.
Solution
After getRegisteredStatisticOrThrow(key), validate statistic.getStatisticType() == StatisticType.SET_STRING.
Files
Priority: Low
Description
addToSetandremoveFromSetcallgetOrCreateSet()before checking the registered type, so passing an INT/LONG/etc. statistic key produces aClassCastExceptioninstead of a clear error.Solution
After
getRegisteredStatisticOrThrow(key), validatestatistic.getStatisticType() == StatisticType.SET_STRING.Files
PlayerStatisticData.javaPriority: Low