mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
SPIGOT-5827: Player.getLocale always returns en_us
This commit is contained in:
parent
72c080cca6
commit
9233a7fb05
@ -157,13 +157,13 @@
|
||||
Logger logger = EntityPlayer.LOGGER;
|
||||
|
||||
logger.getClass();
|
||||
@@ -199,8 +303,32 @@
|
||||
@@ -199,9 +303,33 @@
|
||||
nbttagcompound.set("SpawnDimension", nbtbase);
|
||||
});
|
||||
}
|
||||
+ this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit
|
||||
+
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - World fallback code, either respawn location or global spawn
|
||||
+ public void spawnIn(World world) {
|
||||
@ -185,11 +185,12 @@
|
||||
+ this.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
+ }
|
||||
+ this.playerInteractManager.a((WorldServer) world);
|
||||
}
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
+
|
||||
public void a(int i) {
|
||||
float f = (float) this.getExpToLevel();
|
||||
float f1 = (f - 1.0F) / f;
|
||||
@@ -255,6 +383,11 @@
|
||||
|
||||
@Override
|
||||
@ -760,7 +761,7 @@
|
||||
this.playerInteractManager.setGameMode(enumgamemode);
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.d, (float) enumgamemode.getId()));
|
||||
if (enumgamemode == EnumGamemode.SPECTATOR) {
|
||||
@@ -1184,7 +1555,19 @@
|
||||
@@ -1184,7 +1555,20 @@
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -775,12 +776,13 @@
|
||||
+ PlayerLocaleChangeEvent event = new PlayerLocaleChangeEvent(getBukkitEntity(), packetplayinsettings.locale);
|
||||
+ this.server.server.getPluginManager().callEvent(event);
|
||||
+ }
|
||||
+ this.locale = packetplayinsettings.locale;
|
||||
+ this.clientViewDistance = packetplayinsettings.viewDistance;
|
||||
+ // CraftBukkit end
|
||||
this.cf = packetplayinsettings.d();
|
||||
this.cg = packetplayinsettings.e();
|
||||
this.getDataWatcher().set(EntityPlayer.bp, (byte) packetplayinsettings.f());
|
||||
@@ -1220,13 +1603,13 @@
|
||||
@@ -1220,13 +1604,13 @@
|
||||
if (entity instanceof EntityHuman) {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[]{entity.getId()}));
|
||||
} else {
|
||||
@ -796,7 +798,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1250,7 +1633,7 @@
|
||||
@@ -1250,7 +1634,7 @@
|
||||
this.spectatedEntity = (Entity) (entity == null ? this : entity);
|
||||
if (entity1 != this.spectatedEntity) {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity));
|
||||
@ -805,7 +807,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1279,7 +1662,7 @@
|
||||
@@ -1279,7 +1663,7 @@
|
||||
|
||||
@Nullable
|
||||
public IChatBaseComponent getPlayerListName() {
|
||||
@ -814,7 +816,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1300,9 +1683,16 @@
|
||||
@@ -1300,9 +1684,16 @@
|
||||
return this.advancementDataPlayer;
|
||||
}
|
||||
|
||||
@ -831,7 +833,7 @@
|
||||
if (worldserver == this.world) {
|
||||
this.playerConnection.a(d0, d1, d2, f, f1);
|
||||
} else {
|
||||
@@ -1323,6 +1713,9 @@
|
||||
@@ -1323,6 +1714,9 @@
|
||||
this.server.getPlayerList().a(this, worldserver);
|
||||
this.server.getPlayerList().updateClient(this);
|
||||
}
|
||||
@ -841,7 +843,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -1409,4 +1802,144 @@
|
||||
@@ -1409,4 +1803,144 @@
|
||||
return entityitem;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user