Class Formats
- java.lang.Object
-
- ca.stellardrift.permissionsex.minecraft.command.Formats
-
-
Field Summary
Fields Modifier and Type Field Description static net.kyori.adventure.text.ComponentCOMMA
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static net.kyori.adventure.text.Componentbool(boolean value)static net.kyori.adventure.text.Componentcontexts(Set<ca.stellardrift.permissionsex.context.ContextValue<?>> contexts)static StringformatCommand(cloud.commandframework.Command.Builder<?> command, Map<cloud.commandframework.arguments.CommandArgument<?,?>,String> placeholders)Format the specified command, filling in arguments as provided until the first unset non-static argument is encountered.static StringformatCommand(cloud.commandframework.Command<?> command, cloud.commandframework.arguments.CommandArgument<?,?> arg1, String val1)static StringformatCommand(cloud.commandframework.Command<?> command, cloud.commandframework.arguments.CommandArgument<?,?> arg1, String val1, cloud.commandframework.arguments.CommandArgument<?,?> arg2, String val2)static StringformatCommand(cloud.commandframework.Command<?> command, Map<cloud.commandframework.arguments.CommandArgument<?,?>,String> placeholders)Format the specified command, filling in arguments as provided until the first unset non-static argument is encountered.static net.kyori.adventure.text.format.TextColorlerp(float pct, net.kyori.adventure.text.format.TextColor from, net.kyori.adventure.text.format.TextColor to)static net.kyori.adventure.text.Componentmessage(Throwable throwable)static net.kyori.adventure.text.Componentoption(String option, String value)static net.kyori.adventure.text.Componentpermission(String permission, int value)Represent a permission and its value in a user-visible way.static net.kyori.adventure.text.ComponentpermissionValue(int value)
-
-
-
Field Detail
-
COMMA
public static final net.kyori.adventure.text.Component COMMA
-
-
Method Detail
-
permission
public static net.kyori.adventure.text.Component permission(String permission, int value)
Represent a permission and its value in a user-visible way. The output will appear as<permisison>=<value>.- Parameters:
permission- the permissionvalue- its value, listed and used for colouring- Returns:
- the formatted permission
- Since:
- 2.0.0
-
permissionValue
public static net.kyori.adventure.text.Component permissionValue(int value)
-
bool
public static net.kyori.adventure.text.Component bool(boolean value)
-
contexts
public static net.kyori.adventure.text.Component contexts(Set<ca.stellardrift.permissionsex.context.ContextValue<?>> contexts)
-
formatCommand
public static String formatCommand(cloud.commandframework.Command<?> command, Map<cloud.commandframework.arguments.CommandArgument<?,?>,String> placeholders)
Format the specified command, filling in arguments as provided until the first unset non-static argument is encountered.- Parameters:
command- the command to formatplaceholders- arguments to fill in- Returns:
- the formatted command
-
formatCommand
public static String formatCommand(cloud.commandframework.Command.Builder<?> command, Map<cloud.commandframework.arguments.CommandArgument<?,?>,String> placeholders)
Format the specified command, filling in arguments as provided until the first unset non-static argument is encountered.- Parameters:
command- the command to formatplaceholders- arguments to fill in- Returns:
- the formatted command
-
formatCommand
public static String formatCommand(cloud.commandframework.Command<?> command, cloud.commandframework.arguments.CommandArgument<?,?> arg1, String val1)
-
formatCommand
public static String formatCommand(cloud.commandframework.Command<?> command, cloud.commandframework.arguments.CommandArgument<?,?> arg1, String val1, cloud.commandframework.arguments.CommandArgument<?,?> arg2, String val2)
-
lerp
public static net.kyori.adventure.text.format.TextColor lerp(float pct, net.kyori.adventure.text.format.TextColor from, net.kyori.adventure.text.format.TextColor to)
-
-