Package de.kiridevs.kiricore
Class Prefix
java.lang.Object
de.kiridevs.kiricore.Prefix
public class Prefix
extends java.lang.Object
The Prefix class can be used to easily generate standardized chat prefixes,
complete with colors. Each instance has a chat prefix for the console and one for the player,
the difference being that the player chat prefix uses §f (bold text) while the console chat prefix does not.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Prefix(java.lang.String service, java.lang.String serviceColor, java.lang.String textColor)Constructor of the Prefix class. -
Method Summary
-
Field Details
-
console
public final java.lang.String consoleThe generated chat prefix WITHOUT §f (bold text) to be used for messages shown in console (e.g. server broadcasts, answers to commands executed by everything except players) -
player
public final java.lang.String playerThe generated chat prefix WITH §f (bold text) to be used for messages sent to players (and only players!)
-
-
Constructor Details
-
Prefix
public Prefix(java.lang.String service, java.lang.String serviceColor, java.lang.String textColor)Constructor of the Prefix class. Generates both console and player prefixes.- Parameters:
service- The name of the service (i.e. PlugIn) the prefix is being generated for - the part between the bracketsserviceColor- The Minecraft color code to render the service (i.e. PlugIn) name in. If multiple are used, they have to be separated with '§' signs.textColor- The Minecraft color code to render the actual chat message in. If multiple are used, they have to be separated with '§' signs.
-