CommandHelper

CommandHelper

46.5k Downloads

Cannot create teams on 1.8

LadyCailinBot opened this issue ยท 2 comments

commented

CMDHELPER-3142 - Reported by PseudoKnight

for tracking purposes

java.lang.NoClassDefFoundError: org/bukkit/scoreboard/Team$OptionStatus
com.laytonsmith.abstraction.bukkit.BukkitMCScoreboard.registerNewTeam(BukkitMCScoreboard.java:138)

Probably related to this commit: 49bb8c3

commented

Comment by PseudoKnight

This one is weird. Can someone explain to me how changing this one line fixes it? Note that BukkitMCOption and BukkitMCOptionStatus are identical, and MCOption and MCOptionStatus are identical. Both are abstracting ENUM in the class org.bukkit.scoreboard.Team.

https://github.com/EngineHub/CommandHelper/blob/master/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCTeam.java#L68

from

return BukkitMCOptionStatus.getConvertor().getAbstractedEnum(os);

to

return MCOptionStatus.valueOf(os.name());

Nothing else needed to be changed. How does just calling a new instance of BukkitMCTeam fail due to a single method containing one of two identical ENUM convertors. Also note that setOption() also called BukkitMCOptionStatus.getConvertor() without issue. So presumably it's getAbstractedEnum() that's causing this.

commented

Comment by PseudoKnight

I'm just going to push this solution for now.