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

View File

@ -1,5 +1,6 @@
######0.7
* Added a check if the player is already on the premium list
* Added a forwardSkin config option
* Added premium UUID support
* Removes the need of an Bukkit auth plugin if you use a bungeecord one

View File

@ -13,6 +13,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
* Cauldron support
* Forge/Sponge message support
* Premium UUID support
* Forwards Skins
* BungeeCord support
* Auto register new premium players
* Plugin: ProtocolSupport is supported and can be used as an alternative to ProtocolLib
@ -37,7 +38,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
* Run Spigot and/or BungeeCord in offline mode (see server.properties or config.yml)
* An auth plugin. Supported Plugins
#### Bukkit
####Bukkit
* [AuthMe](http://dev.bukkit.org/bukkit-plugins/authme-reloaded/)
* [xAuth](http://dev.bukkit.org/bukkit-plugins/xauth/)
@ -46,7 +47,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
* [RoyalAuth](http://dev.bukkit.org/bukkit-plugins/royalauth/)
* [UltraAuth](http://dev.bukkit.org/bukkit-plugins/ultraauth-aa/)
#### BungeeCord
####BungeeCord
* [BungeeAuth](https://www.spigotmc.org/resources/bungeeauth.493/)
@ -140,7 +141,7 @@ into the whitelist file of your Bukkit/Spigot server. For security reasons, don'
This plugin will automatically detect if BungeeCord is running and handle premium checks on BungeeCord.
####Could premium players have a premium UUID and Skin?
Something like that is possible, but is not yet implemented.
Since 0.7 both features are implemented. You can check the config.yml in order to activate it.
####Is this plugin compatible with Cauldron?
It's not tested yet, but all needed methods also exists in Cauldron so it could work together.

View File

@ -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 {

View File

@ -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.");
}
}
}

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