-
Notifications
You must be signed in to change notification settings - Fork 2
Messages HowTo
Starting with InfiniteClaims version 2.1.0 the support for custom messages, and thus localization was added. With each update of InfiniteClaims more and more customizable messages will be added to the file, without overwriting your current custom messages.
Once you have finished customizing the messages, you can reload InfiniteClaims to accept the changes with /iclaims reload
Below is an example messages.yml
with extra comments, explaining the messages purpose and the required parameters. Any color codes that are supported by Bukkit, are supported by the custom messages, and messages that contain something like this %s
, require it, and you risk breaking InfiniteClaims if you omit it.
To explain what %s
is, it is used in a format string within Java, which is how I am accomplishing customized messages, along with variable information that is normally included in the messages. Current custom messages only use the following format codes, and if they don't use them in example below... don't add them (bad things could happen).
%s // A place holder for String's, such as a players name, plot name, etc.
%d // A place holder for numbers, currently only used in the plots-left message
Important! Below I put what the format characters are for in parathesis, ex. (plotName). The order that I have them listed below is the order they will be in the message, so word your sentences accordingly. (Making a bukkit plugin, not a sentence structure predictor)
If you have any other question about custom messages or would like to request more be added, please inquire within the plugin pages comment section.
# Do not touch this! Period.
version: 2.1.0
messages:
# The first part of the new plot message, no format character
new-plot-claimed-pt1: "You don't seem to have a plot... Finding one now."
# The second part of the new plot message, one format character required: %s(plotName)
new-plot-claimed-pt2: "Found a plot for you, it's called '&e%s&f'."
# The third part of the new plot message, you can omit only this part if it is not required by changing it to "".
# No format characters
new-plot-claimed-pt3: "Use '/icplot' to learn how to return to this plot."
# The alternative message used if you are claiming another plot, no format characters
new-plot-claimed-pt1-multi: "Finding you another plot..."
# How many plots left that you can claim, one format character: %d(numberOfPlotsLeft)
plots-left: "You can claim &e%d&f more plots in this world."
# Used when the player tries to claim another plot when they have already claimed the max, no format characters.
max-plots-reached: "You already have the maximum number of plots allowed on this server."
# Used when the player tries to use a non-plot world with InfiniteClaims, one format character: %s(worldName)
not-plotworld-error: "&c%s is not a plot world, please try again in a plot world."
# Used for when the player adds a friend to their plot. Two format characters: %s(playerAdded), %s(plotName)
add-member: "Added '&e%s&f' to plot &e%s."
# Used for when the player removes a friend from their plot. Two format characters: %s(playerRemoved), %s(plotName)
remove-member: "Removed '&e%s&f' from plot &e%s."
# Used for when removing a players plot, three format characters: %s(playerName), %s(plotName), %s(worldName)
removed-plot: "Removed &c%s&f's plot: &c%s&f. Removed from '&c%s&f'."
# Used when the player specified a plot that doesn't exist. One format character: %s(plotName)
plot-not-found: "&c%s &fis not a valid plot. Please try again."
# Used when the player specified a player that doesn't exist. One format character: %s(playerName)
player-not-found: "Could not find a plot for that player. Please try again."