forked from TuxCoding/FastLogin
Fixed error message condition for /premium
This commit is contained in:
@ -33,8 +33,8 @@ public class PremiumCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String playerName = sender.getName();
|
String playerName = sender.getName();
|
||||||
boolean exist = plugin.getEnabledPremium().add(playerName);
|
boolean didntexist = plugin.getEnabledPremium().add(playerName);
|
||||||
if (exist) {
|
if (!didntexist) {
|
||||||
sender.sendMessage(ChatColor.DARK_RED + "You are already on the premium list");
|
sender.sendMessage(ChatColor.DARK_RED + "You are already on the premium list");
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(ChatColor.DARK_GREEN + "Added to the list of premium players");
|
sender.sendMessage(ChatColor.DARK_GREEN + "Added to the list of premium players");
|
||||||
@ -44,8 +44,12 @@ public class PremiumCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
String playerName = args[0];
|
String playerName = args[0];
|
||||||
plugin.getEnabledPremium().add(playerName);
|
boolean didntexist = plugin.getEnabledPremium().add(playerName);
|
||||||
sender.sendMessage(ChatColor.DARK_GREEN + "Added player to the list of premium players");
|
if (!didntexist) {
|
||||||
|
sender.sendMessage(ChatColor.DARK_RED + "You are already on the premium list");
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(ChatColor.DARK_GREEN + "Added to the list of premium players");
|
||||||
|
}
|
||||||
// notifiyBungeeCord();
|
// notifiyBungeeCord();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user