fix some stuff
This commit is contained in:
parent
52795a349f
commit
58c4293bc9
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -816,7 +816,7 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting {
|
|||
var2 = (var2 >> 5) + 2;
|
||||
|
||||
if (var2 > 3 && var2 < 15) {
|
||||
this.renderDistance = var2;
|
||||
this.renderDistance = var2 > 10 ? 10 : var2;
|
||||
if(this.lastRenderDistance != this.renderDistance) {
|
||||
if(this.mcServer.isSinglePlayer() && this.mcServer.getServerOwner().equals(this.username)) {
|
||||
for(int i = 0; i < this.mcServer.worldServers.length; ++i) {
|
||||
|
|
|
@ -132,7 +132,7 @@ public class NetLoginHandler extends NetHandler {
|
|||
this.kickUser(var1);
|
||||
} else {
|
||||
EntityPlayerMP var2 = this.mcServer.getConfigurationManager().createPlayerForUser(this.clientUsername);
|
||||
var2.renderDistance = var2.lastRenderDistance = this.viewDistance;
|
||||
var2.renderDistance = var2.lastRenderDistance = (this.viewDistance > 10 && !this.mcServer.getServerOwner().equals(this.clientUsername)) ? 10 : this.viewDistance;
|
||||
if (var2 != null) {
|
||||
this.mcServer.getConfigurationManager().initializeConnectionToPlayer(this.myTCPConnection, var2);
|
||||
}else {
|
||||
|
|
|
@ -91,12 +91,9 @@ public class PlayerManager {
|
|||
player = cycleAllRenderDistance(player);
|
||||
}else {
|
||||
if(player.lastRenderDistance != player.renderDistance) {
|
||||
// these 2 are called within recreatePlayerEntity
|
||||
// removePlayer(player);
|
||||
player.lastRenderDistance = player.renderDistance;
|
||||
player.playerNetServerHandler.playerEntity = player.mcServer.getConfigurationManager().recreatePlayerEntity(player, 0, true, false);
|
||||
player = player.playerNetServerHandler.playerEntity;
|
||||
player.lastRenderDistance = player.renderDistance;
|
||||
// addPlayer(player.playerNetServerHandler.playerEntity);
|
||||
}
|
||||
}
|
||||
return player;
|
||||
|
@ -112,14 +109,11 @@ public class PlayerManager {
|
|||
EntityPlayerMP playerReload = (EntityPlayerMP)curList.get(i);
|
||||
boolean returnThisOne = playerReload.equals(player);
|
||||
if (playerReload.lastRenderDistance != player.renderDistance) {
|
||||
// these 2 are called within recreatePlayerEntity
|
||||
// removePlayer(playerReload);
|
||||
playerReload.lastRenderDistance = playerReload.renderDistance = player.renderDistance;
|
||||
playerReload.playerNetServerHandler.playerEntity = playerReload.mcServer.getConfigurationManager().recreatePlayerEntity(playerReload, 0, true, false);
|
||||
playerReload = playerReload.playerNetServerHandler.playerEntity;
|
||||
playerReload.lastRenderDistance = playerReload.renderDistance;
|
||||
}
|
||||
if (returnThisOne) player = playerReload;
|
||||
// addPlayer(playerReload.playerNetServerHandler.playerEntity);
|
||||
}
|
||||
}
|
||||
return player;
|
||||
|
|
|
@ -247,7 +247,7 @@ public class ServerConfigurationManager {
|
|||
return "The server is full!";
|
||||
}else {
|
||||
for(EntityPlayerMP pp : (List<EntityPlayerMP>)this.playerEntityList) {
|
||||
if(pp.username.equals(par2Str)) {
|
||||
if(pp.username.equalsIgnoreCase(par2Str)) {
|
||||
return "Someone with your username is already on this world";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user