Add "dependency not loaded" message

This commit is contained in:
Frank van der Heijden 2020-06-21 11:47:24 +02:00
parent 166df139d7
commit ac6de28b68
No known key found for this signature in database
GPG key ID: 26DA56488D314D11
3 changed files with 17 additions and 1 deletions

View file

@ -12,12 +12,25 @@ public enum Result {
FILE_CHANGED,
INVALID_DESCRIPTION,
INVALID_PLUGIN,
UNKNOWN_DEPENDENCY,
ERROR,
SUCCESS;
private String arg;
Result() {
this.arg = "";
}
public Result arg(String arg) {
this.arg = arg;
return this;
}
public void sendTo(CommandSender sender, String action, String what) {
Messenger.sendMessage(sender, "serverutils." + this.name().toLowerCase(),
"%action%", action,
"%what%", what);
"%what%", what,
"%arg%", arg);
}
}