Skip to content

Commit

Permalink
fix(spigot): bossbar action UPDATE_PROGRESS cannot be converted
Browse files Browse the repository at this point in the history
Adds an alias for this enum member, since it has been renamed between
Minecraft versions.
  • Loading branch information
diogotcorreia committed Jun 23, 2024
1 parent 3678313 commit a11ab27
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.comphenix.protocol.wrappers.EnumWrappers;
import com.comphenix.protocol.wrappers.WrappedChatComponent;
import com.rexcantor64.triton.player.SpigotLanguagePlayer;
import lombok.Getter;
import lombok.val;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TranslatableComponent;
Expand Down Expand Up @@ -225,7 +226,14 @@ public void registerPacketTypes(Map<PacketType, HandlerFunction> registry) {
/**
* BossBar packet Action wrapper
*/
public enum Action {
ADD, REMOVE, UPDATE_PCT, UPDATE_NAME, UPDATE_STYLE, UPDATE_PROPERTIES
@Getter
public enum Action implements EnumWrappers.AliasedEnum {
ADD, REMOVE, UPDATE_PROGRESS("UPDATE_PCT"), UPDATE_NAME, UPDATE_STYLE, UPDATE_PROPERTIES;

private final String[] aliases;

Action(String... aliases) {
this.aliases = aliases;
}
}
}

0 comments on commit a11ab27

Please sign in to comment.