Added check if player is already premium + Updated FakePlayer against

the newest API changes
This commit is contained in:
games647
2016-03-27 11:18:46 +02:00
parent 9a30a0b299
commit b86bdf5f23
5 changed files with 33 additions and 8 deletions
@@ -33,8 +33,13 @@ public class PremiumCommand implements CommandExecutor {
}
String playerName = sender.getName();
plugin.getEnabledPremium().add(playerName);
sender.sendMessage(ChatColor.DARK_GREEN + "Added to the list of premium players");
boolean exist = plugin.getEnabledPremium().add(playerName);
if (exist) {
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((Player) sender);
return true;
} else {
@@ -1428,5 +1428,25 @@ public class UltraAuthHook implements BukkitAuthPlugin {
public void setGliding(boolean arg0) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setAI(boolean arg0) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean hasAI() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setInvulnerable(boolean arg0) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isInvulnerable() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
}
+1 -3
View File
@@ -22,9 +22,7 @@
autoRegister: false
# If this plugin detected that a player has a premium, it can also set the associated
# uuid from that account.
#
# So if the players changes their usernames, they will still have
# uuid from that account. So if the players changes their usernames, they will still have
# the same playerdata (inventory, permissions, ...)
#
# Warning: This also means that the UUID will be different if the player is connecting