Interface AbstractTeam.TeamOption<P>
- Type Parameters:
P- Packet-based (folia) value type.
- All Known Implementing Classes:
AbstractTeam.CollisionRule, AbstractTeam.NameTags
- Enclosing interface:
AbstractTeam
public static interface AbstractTeam.TeamOption<P>
Interface for team options that can be represented as both a packet-based value and a Bukkit value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends AbstractTeam.TeamOption<?>>
EfromBukkit(E[] values, Team.OptionStatus bukkitValue) Utility method to convert from a Bukkit value to the corresponding enum constant.static <E extends AbstractTeam.TeamOption<P>, P>
EfromFolia(E[] values, P foliaValue) Utility method to convert from a packet-based (folia) value to the corresponding enum constant.Gets the Bukkit value of this option.Gets the packet-based (folia) value of this option.
-
Method Details
-
getFoliaValue
P getFoliaValue()Gets the packet-based (folia) value of this option.- Returns:
- The packet-based (folia) value of this option.
-
getBukkitValue
Team.OptionStatus getBukkitValue()Gets the Bukkit value of this option.- Returns:
- The Bukkit value of this option.
-
fromFolia
Utility method to convert from a packet-based (folia) value to the corresponding enum constant.- Type Parameters:
E- Enum type.P- Packet-based (folia) value type.- Parameters:
values- Array of enum constants.foliaValue- Packet-based (folia) value to convert.- Returns:
- The corresponding enum constant.
-
fromBukkit
static <E extends AbstractTeam.TeamOption<?>> E fromBukkit(E[] values, Team.OptionStatus bukkitValue) Utility method to convert from a Bukkit value to the corresponding enum constant.- Type Parameters:
E- Enum type.- Parameters:
values- Array of enum constants.bukkitValue- Bukkit value to convert.- Returns:
- The corresponding enum constant.
-