Added none to flair setting
This commit is contained in:
parent
daa341ff7d
commit
f9363a7c69
2 changed files with 9 additions and 5 deletions
Binary file not shown.
|
@ -154,7 +154,8 @@ public class Commands implements CommandExecutor {
|
||||||
MaybeOfflinePlayer mp = MaybeOfflinePlayer
|
MaybeOfflinePlayer mp = MaybeOfflinePlayer
|
||||||
.GetFromName(args[1]);
|
.GetFromName(args[1]);
|
||||||
if (mp == null) {
|
if (mp == null) {
|
||||||
player.sendMessage("§cUnknown user (player has to be online): " + args[1]);
|
player.sendMessage("§cUnknown user (player has to be online): "
|
||||||
|
+ args[1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
player.sendMessage("§bUsername of " + args[1] + ": "
|
player.sendMessage("§bUsername of " + args[1] + ": "
|
||||||
|
@ -443,7 +444,8 @@ public class Commands implements CommandExecutor {
|
||||||
}
|
}
|
||||||
MaybeOfflinePlayer p = MaybeOfflinePlayer.GetFromName(args[2]);
|
MaybeOfflinePlayer p = MaybeOfflinePlayer.GetFromName(args[2]);
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
String message = "§cPlayer not found: " + args[2] + " - Currently only online players can be viewed§r";
|
String message = "§cPlayer not found: " + args[2]
|
||||||
|
+ " - Currently only online players can be viewed§r";
|
||||||
SendMessage(player, message);
|
SendMessage(player, message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -498,7 +500,7 @@ public class Commands implements CommandExecutor {
|
||||||
if (args.length < 5) {
|
if (args.length < 5) {
|
||||||
SendMessage(
|
SendMessage(
|
||||||
player,
|
player,
|
||||||
"§cUsage: /u admin setflair <playername> <flairtime> <cheater(true/false)> [username]");
|
"§cUsage: /u admin setflair <playername> <flairtime (or non-presser, cant-press, none)> <cheater(true/false)> [username]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Player p = Bukkit.getPlayer(args[2]);
|
Player p = Bukkit.getPlayer(args[2]);
|
||||||
|
@ -511,12 +513,14 @@ public class Commands implements CommandExecutor {
|
||||||
flairtime = MaybeOfflinePlayer.FlairTimeNonPresser;
|
flairtime = MaybeOfflinePlayer.FlairTimeNonPresser;
|
||||||
else if (args[3].equalsIgnoreCase("cant-press"))
|
else if (args[3].equalsIgnoreCase("cant-press"))
|
||||||
flairtime = MaybeOfflinePlayer.FlairTimeCantPress;
|
flairtime = MaybeOfflinePlayer.FlairTimeCantPress;
|
||||||
|
else if (args[3].equalsIgnoreCase("none"))
|
||||||
|
flairtime = MaybeOfflinePlayer.FlairTimeNone;
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
flairtime = Short.parseShort(args[3]);
|
flairtime = Short.parseShort(args[3]);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SendMessage(player,
|
SendMessage(player,
|
||||||
"§cFlairtime must be a number or \"non-presser\", \"cant-press\".");
|
"§cFlairtime must be a number, \"non-presser\", \"cant-press\" or \"none\".");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} // TODO: Split config to per-player
|
} // TODO: Split config to per-player
|
||||||
|
|
Loading…
Reference in a new issue