Added forwardSkin config option

This commit is contained in:
games647
2016-03-23 10:15:48 +01:00
parent fd3b1ed8b6
commit 9a30a0b299
5 changed files with 31 additions and 6 deletions

View File

@ -1,5 +1,10 @@
######0.7
* Added a forwardSkin config option
* Added premium UUID support
* Removes the need of an Bukkit auth plugin if you use a bungeecord one
* Optimize performance and thread-safety
* Added BungeeAuth support
* Added /premium [player] command with optional player parameter
* Fixed BungeeCord support
* Changed config option autologin to autoregister to clarify the usage

View File

@ -12,6 +12,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi
* Support various of auth plugins
* Cauldron support
* Forge/Sponge message support
* Premium UUID support
* BungeeCord support
* Auto register new premium players
* Plugin: ProtocolSupport is supported and can be used as an alternative to ProtocolLib

View File

@ -37,7 +37,7 @@ public class BukkitJoinListener implements Listener {
//removing the session because we now use it
final PlayerSession session = plugin.getSessions().get(player.getAddress().toString());
if (session != null) {
if (session != null && plugin.getConfig().getBoolean("forwardSkin")) {
WrappedGameProfile gameProfile = WrappedGameProfile.fromPlayer(player);
WrappedSignedProperty skin = session.getSkin();
if (skin != null) {

View File

@ -44,10 +44,13 @@ public class ProtcolSupportListener implements Listener {
@EventHandler(ignoreCancelled = true)
public void onPropertiesResolve(PlayerPropertiesResolveEvent propertiesResolveEvent) {
InetSocketAddress address = propertiesResolveEvent.getAddress();
PlayerSession session = plugin.getSessions().get(address.toString());
if (session != null) {
session.setVerified(true);
//skin was resolved -> premium player
if (propertiesResolveEvent.hasProperty("textures")) {
InetSocketAddress address = propertiesResolveEvent.getAddress();
PlayerSession session = plugin.getSessions().get(address.toString());
if (session != null) {
session.setVerified(true);
}
}
}

View File

@ -1,4 +1,7 @@
# FastLogin config
# Project site: https://www.spigotmc.org/resources/fastlogin.14153
# Source code: https://github.com/games647/FastLogin
#
# You can access the newest config here:
# https://github.com/games647/FastLogin/blob/master/bukkit/src/main/resources/config.yml
@ -35,4 +38,17 @@ autoRegister: false
# Moreover you may want to convert the offline UUID to a premium UUID. This will ensure that the player
# will have the same inventory, permissions, ... if they switched to premium authentification from offline/cracked
# authentification.
premiumUuid: false
premiumUuid: false
# If your players have a premium account and a skin associated to their account, this plugin
# can download the data and set it to the online player.
#
# Keep in mind that this will only works if the player:
# * is the owner of the premium account
# * the serverconnection is established through a premium connection (paid account authentification)
# * has a skin
#
# This means this plugin doesn't need to create a new connection to the Mojang servers, because
# the skin data is included in the Auth-Verification-Response sent by Mojang. If you want to use for other
# players like cracked player, you have to use other plugins.
forwardSkin: true