geforkt von Mirrors/Paper
Load player data before calling PlayerLoginEvent. Fixes BUKKIT-1531 and Fixes BUKKIT-601.
Dieser Commit ist enthalten in:
Ursprung
e61a316815
Commit
119b5d18a5
@ -102,7 +102,7 @@ public class NetLoginHandler extends NetHandler {
|
|||||||
EntityPlayer entityplayer = this.server.serverConfigurationManager.attemptLogin(this, packet1login.name, this.hostname); // CraftBukkit - add hostname parameter
|
EntityPlayer entityplayer = this.server.serverConfigurationManager.attemptLogin(this, packet1login.name, this.hostname); // CraftBukkit - add hostname parameter
|
||||||
|
|
||||||
if (entityplayer != null) {
|
if (entityplayer != null) {
|
||||||
this.server.serverConfigurationManager.b(entityplayer);
|
//this.server.serverConfigurationManager.b(entityplayer); // CraftBukkit - Moved to attemptLogin
|
||||||
// entityplayer.a((World) this.server.a(entityplayer.dimension)); // CraftBukkit - set by Entity
|
// entityplayer.a((World) this.server.a(entityplayer.dimension)); // CraftBukkit - set by Entity
|
||||||
entityplayer.itemInWorldManager.a((WorldServer) entityplayer.world);
|
entityplayer.itemInWorldManager.a((WorldServer) entityplayer.world);
|
||||||
// CraftBukkit - add world and location to 'logged in' message.
|
// CraftBukkit - add world and location to 'logged in' message.
|
||||||
|
@ -213,7 +213,6 @@ public class ServerConfigurationManager {
|
|||||||
|
|
||||||
if (this.banByName.contains(s.trim().toLowerCase())) {
|
if (this.banByName.contains(s.trim().toLowerCase())) {
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, "You are banned from this server!");
|
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, "You are banned from this server!");
|
||||||
// return null // CraftBukkit
|
|
||||||
} else if (!this.isWhitelisted(s)) {
|
} else if (!this.isWhitelisted(s)) {
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "You are not white-listed on this server!");
|
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "You are not white-listed on this server!");
|
||||||
} else if (this.banByIP.contains(s1)) {
|
} else if (this.banByIP.contains(s1)) {
|
||||||
@ -224,6 +223,7 @@ public class ServerConfigurationManager {
|
|||||||
event.disallow(PlayerLoginEvent.Result.ALLOWED, s1);
|
event.disallow(PlayerLoginEvent.Result.ALLOWED, s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.b(entity);
|
||||||
this.cserver.getPluginManager().callEvent(event);
|
this.cserver.getPluginManager().callEvent(event);
|
||||||
if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
|
if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
|
||||||
netloginhandler.disconnect(event.getKickMessage());
|
netloginhandler.disconnect(event.getKickMessage());
|
||||||
@ -235,6 +235,7 @@ public class ServerConfigurationManager {
|
|||||||
|
|
||||||
if (entityplayer.name.equalsIgnoreCase(s)) {
|
if (entityplayer.name.equalsIgnoreCase(s)) {
|
||||||
entityplayer.netServerHandler.disconnect("You logged in from another location");
|
entityplayer.netServerHandler.disconnect("You logged in from another location");
|
||||||
|
this.b(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren