You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in Java there is a String formatter which allows variables (like %s) to be used as placeholders. s being the placeholder for String. since it does not contain a specific number, it will use them in order from first to last.
String.format("Hello %s! %s name is %s!", "world", "My", "Billy");
// Outputs: "Hello world! My name is Billy!"
You can specify the argument numbers like so:
String.format("Hello %3s! %1s name is %2s!", "world", "My", "Billy");
// Outputs: "Hello Billy! world name is My!"
There are other argument types than String, but that's all we use in Purpur's config.
To know what arguments are available, you can check out the source code to document them.
using ping-command-output as an example it could be formatted something like this:
ping-command-output
default: §a%s's ping is %sms
description: Output when /ping is run. %s - uses the values below in order from first to last %1 - player's name %2 - player's ping in ms
The text was updated successfully, but these errors were encountered:
in Java there is a String formatter which allows variables (like
%s
) to be used as placeholders.s
being the placeholder for String. since it does not contain a specific number, it will use them in order from first to last.You can specify the argument numbers like so:
There are other argument types than String, but that's all we use in Purpur's config.
To know what arguments are available, you can check out the source code to document them.
using
ping-command-output
as an example it could be formatted something like this:The text was updated successfully, but these errors were encountered: