ServerAPI/src/main/java/xyz/etztech/serverapi/Lang.java

31 lines
769 B
Java
Raw Normal View History

package xyz.etztech.serverapi;
import org.bukkit.command.CommandSender;
public enum Lang {
NO_PERMISSION("You don't have permission to do that.", Color.ERROR),
UNKNOWN_COMMAND("This command wasn't recognized.", Color.ERROR),
PLUGIN_RELOADED("ServerAPI reloaded.", Color.INFO);
private final String message;
private final Color color;
Lang(String message, Color color) {
this.message = message;
this.color = color;
}
public String getMessage(Object ...args) {
return String.format(this.message, args);
}
public Color getColor() {
return this.color;
}
public void sms(CommandSender sender, Object ...args) {
this.color.sms(sender, String.format(this.message, args));
}
}