|
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
|
--- a/net/minecraft/server/players/PlayerList.java
|
|
|
|
|
+++ b/net/minecraft/server/players/PlayerList.java
|
|
|
|
|
@@ -108,6 +108,26 @@
|
|
|
|
|
@@ -102,6 +102,26 @@
|
|
|
|
|
import net.minecraft.world.scores.ScoreboardTeamBase;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
|
|
@@ -27,7 +27,7 @@
|
|
|
|
|
public abstract class PlayerList {
|
|
|
|
|
|
|
|
|
|
public static final File USERBANLIST_FILE = new File("banned-players.json");
|
|
|
|
|
@@ -119,14 +139,16 @@
|
|
|
|
|
@@ -114,14 +134,16 @@
|
|
|
|
|
private static final int SEND_PLAYER_INFO_INTERVAL = 600;
|
|
|
|
|
private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
|
|
|
|
private final MinecraftServer server;
|
|
|
|
|
@@ -47,7 +47,7 @@
|
|
|
|
|
public final WorldNBTStorage playerIo;
|
|
|
|
|
private boolean doWhiteList;
|
|
|
|
|
private final LayeredRegistryAccess<RegistryLayer> registries;
|
|
|
|
|
@@ -138,13 +160,23 @@
|
|
|
|
|
@@ -132,13 +154,23 @@
|
|
|
|
|
private static final boolean ALLOW_LOGOUTIVATOR = false;
|
|
|
|
|
private int sendAllPlayerInfoIn;
|
|
|
|
|
|
|
|
|
|
@@ -72,8 +72,8 @@
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
this.server = minecraftserver;
|
|
|
|
|
this.registries = layeredregistryaccess;
|
|
|
|
|
this.synchronizedRegistries = (new IRegistryCustom.c(RegistrySynchronization.networkedRegistries(layeredregistryaccess))).freeze();
|
|
|
|
|
@@ -168,9 +200,15 @@
|
|
|
|
|
this.maxPlayers = i;
|
|
|
|
|
@@ -161,9 +193,15 @@
|
|
|
|
|
|
|
|
|
|
NBTTagCompound nbttagcompound = this.load(entityplayer);
|
|
|
|
|
ResourceKey resourcekey;
|
|
|
|
|
@@ -90,9 +90,9 @@
|
|
|
|
|
Logger logger = PlayerList.LOGGER;
|
|
|
|
|
|
|
|
|
|
Objects.requireNonNull(logger);
|
|
|
|
|
@@ -197,7 +235,8 @@
|
|
|
|
|
s1 = networkmanager.getRemoteAddress().toString();
|
|
|
|
|
}
|
|
|
|
|
@@ -186,7 +224,8 @@
|
|
|
|
|
entityplayer.setServerLevel(worldserver1);
|
|
|
|
|
String s1 = networkmanager.getLoggableAddress(this.server.logIPs());
|
|
|
|
|
|
|
|
|
|
- PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{entityplayer.getName().getString(), s1, entityplayer.getId(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ()});
|
|
|
|
|
+ // CraftBukkit - Moved message to after join
|
|
|
|
|
@@ -100,15 +100,15 @@
|
|
|
|
|
WorldData worlddata = worldserver1.getLevelData();
|
|
|
|
|
|
|
|
|
|
entityplayer.loadGameTypes(nbttagcompound);
|
|
|
|
|
@@ -207,6 +246,7 @@
|
|
|
|
|
boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
|
|
|
|
|
@@ -197,6 +236,7 @@
|
|
|
|
|
boolean flag2 = gamerules.getBoolean(GameRules.RULE_LIMITED_CRAFTING);
|
|
|
|
|
|
|
|
|
|
playerconnection.send(new PacketPlayOutLogin(entityplayer.getId(), worlddata.isHardcore(), entityplayer.gameMode.getGameModeForPlayer(), entityplayer.gameMode.getPreviousGameModeForPlayer(), this.server.levelKeys(), this.synchronizedRegistries, worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), this.getMaxPlayers(), this.viewDistance, this.simulationDistance, flag1, !flag, worldserver1.isDebug(), worldserver1.isFlat(), entityplayer.getLastDeathLocation(), entityplayer.getPortalCooldown()));
|
|
|
|
|
playerconnection.send(new PacketPlayOutLogin(entityplayer.getId(), worlddata.isHardcore(), this.server.levelKeys(), this.getMaxPlayers(), this.viewDistance, this.simulationDistance, flag1, !flag, flag2, entityplayer.createCommonSpawnInfo(worldserver1)));
|
|
|
|
|
+ entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
|
|
|
|
|
playerconnection.send(new ClientboundUpdateEnabledFeaturesPacket(FeatureFlags.REGISTRY.toNames(worldserver1.enabledFeatures())));
|
|
|
|
|
playerconnection.send(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.BRAND, (new PacketDataSerializer(Unpooled.buffer())).writeUtf(this.getServer().getServerModName())));
|
|
|
|
|
playerconnection.send(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
|
|
|
|
|
@@ -226,8 +266,10 @@
|
|
|
|
|
playerconnection.send(new PacketPlayOutAbilities(entityplayer.getAbilities()));
|
|
|
|
|
playerconnection.send(new PacketPlayOutHeldItemSlot(entityplayer.getInventory().selected));
|
|
|
|
|
@@ -213,8 +253,10 @@
|
|
|
|
|
} else {
|
|
|
|
|
ichatmutablecomponent = IChatBaseComponent.translatable("multiplayer.player.joined.renamed", entityplayer.getDisplayName(), s);
|
|
|
|
|
}
|
|
|
|
|
@@ -120,7 +120,7 @@
|
|
|
|
|
playerconnection.teleport(entityplayer.getX(), entityplayer.getY(), entityplayer.getZ(), entityplayer.getYRot(), entityplayer.getXRot());
|
|
|
|
|
ServerPing serverping = this.server.getStatus();
|
|
|
|
|
|
|
|
|
|
@@ -235,13 +277,64 @@
|
|
|
|
|
@@ -222,13 +264,64 @@
|
|
|
|
|
entityplayer.sendServerStatus(serverping);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -186,10 +186,10 @@
|
|
|
|
|
+
|
|
|
|
|
+ worldserver1 = entityplayer.serverLevel(); // CraftBukkit - Update in case join event changed it
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
this.server.getServerResourcePack().ifPresent((minecraftserver_serverresourcepackinfo) -> {
|
|
|
|
|
entityplayer.sendTexturePack(minecraftserver_serverresourcepackinfo.url(), minecraftserver_serverresourcepackinfo.hash(), minecraftserver_serverresourcepackinfo.isRequired(), minecraftserver_serverresourcepackinfo.prompt());
|
|
|
|
|
});
|
|
|
|
|
@@ -255,8 +348,11 @@
|
|
|
|
|
Iterator iterator = entityplayer.getActiveEffects().iterator();
|
|
|
|
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
|
@@ -239,8 +332,11 @@
|
|
|
|
|
|
|
|
|
|
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
|
|
|
|
|
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
|
|
|
|
@@ -203,7 +203,7 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (entity != null) {
|
|
|
|
|
@@ -299,6 +395,8 @@
|
|
|
|
|
@@ -283,6 +379,8 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
entityplayer.initInventoryMenu();
|
|
|
|
|
@@ -212,7 +212,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void updateEntireScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
|
|
|
|
|
@@ -331,30 +429,31 @@
|
|
|
|
|
@@ -319,30 +417,31 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void addWorldborderListener(WorldServer worldserver) {
|
|
|
|
|
@@ -249,7 +249,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@@ -382,14 +481,15 @@
|
|
|
|
|
@@ -370,14 +469,15 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void save(EntityPlayer entityplayer) {
|
|
|
|
|
@@ -267,7 +267,7 @@
|
|
|
|
|
|
|
|
|
|
if (advancementdataplayer != null) {
|
|
|
|
|
advancementdataplayer.save();
|
|
|
|
|
@@ -397,10 +497,24 @@
|
|
|
|
|
@@ -385,10 +485,24 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -293,7 +293,7 @@
|
|
|
|
|
this.save(entityplayer);
|
|
|
|
|
if (entityplayer.isPassenger()) {
|
|
|
|
|
Entity entity = entityplayer.getRootVehicle();
|
|
|
|
|
@@ -424,18 +538,66 @@
|
|
|
|
|
@@ -412,18 +526,66 @@
|
|
|
|
|
|
|
|
|
|
if (entityplayer1 == entityplayer) {
|
|
|
|
|
this.playersByUUID.remove(uuid);
|
|
|
|
|
@@ -333,7 +333,7 @@
|
|
|
|
|
|
|
|
|
|
- if (this.bans.isBanned(gameprofile)) {
|
|
|
|
|
+ // Moved from processLogin
|
|
|
|
|
+ UUID uuid = UUIDUtil.getOrCreatePlayerUUID(gameprofile);
|
|
|
|
|
+ UUID uuid = gameprofile.getId();
|
|
|
|
|
+ List<EntityPlayer> list = Lists.newArrayList();
|
|
|
|
|
+
|
|
|
|
|
+ EntityPlayer entityplayer;
|
|
|
|
|
@@ -358,7 +358,7 @@
|
|
|
|
|
+ // depending on the outcome.
|
|
|
|
|
+ SocketAddress socketaddress = loginlistener.connection.getRemoteAddress();
|
|
|
|
|
+
|
|
|
|
|
+ EntityPlayer entity = new EntityPlayer(this.server, this.server.getLevel(World.OVERWORLD), gameprofile);
|
|
|
|
|
+ EntityPlayer entity = new EntityPlayer(this.server, this.server.getLevel(World.OVERWORLD), gameprofile, ClientInformation.createDefault());
|
|
|
|
|
+ Player player = entity.getBukkitEntity();
|
|
|
|
|
+ PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress());
|
|
|
|
|
+
|
|
|
|
|
@@ -366,7 +366,7 @@
|
|
|
|
|
GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.bans.get(gameprofile);
|
|
|
|
|
|
|
|
|
|
ichatmutablecomponent = IChatBaseComponent.translatable("multiplayer.disconnect.banned.reason", gameprofilebanentry.getReason());
|
|
|
|
|
@@ -443,10 +605,12 @@
|
|
|
|
|
@@ -431,10 +593,12 @@
|
|
|
|
|
ichatmutablecomponent.append((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.banned.expiration", PlayerList.BAN_DATE_FORMAT.format(gameprofilebanentry.getExpires())));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -382,7 +382,7 @@
|
|
|
|
|
IpBanEntry ipbanentry = this.ipBans.get(socketaddress);
|
|
|
|
|
|
|
|
|
|
ichatmutablecomponent = IChatBaseComponent.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
|
|
|
|
|
@@ -454,13 +618,25 @@
|
|
|
|
|
@@ -442,17 +606,32 @@
|
|
|
|
|
ichatmutablecomponent.append((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.banned_ip.expiration", PlayerList.BAN_DATE_FORMAT.format(ipbanentry.getExpires())));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -405,18 +405,27 @@
|
|
|
|
|
+ return entity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- public EntityPlayer getPlayerForLogin(GameProfile gameprofile) {
|
|
|
|
|
+ public EntityPlayer getPlayerForLogin(GameProfile gameprofile, EntityPlayer player) { // CraftBukkit - added EntityPlayer
|
|
|
|
|
+ /* CraftBukkit startMoved up
|
|
|
|
|
UUID uuid = UUIDUtil.getOrCreatePlayerUUID(gameprofile);
|
|
|
|
|
List<EntityPlayer> list = Lists.newArrayList();
|
|
|
|
|
- public EntityPlayer getPlayerForLogin(GameProfile gameprofile, ClientInformation clientinformation) {
|
|
|
|
|
- return new EntityPlayer(this.server, this.server.overworld(), gameprofile, clientinformation);
|
|
|
|
|
+ // CraftBukkit start - added EntityPlayer
|
|
|
|
|
+ public EntityPlayer getPlayerForLogin(GameProfile gameprofile, ClientInformation clientinformation, EntityPlayer player) {
|
|
|
|
|
+ player.updateOptions(clientinformation);
|
|
|
|
|
+ return player;
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -487,14 +663,24 @@
|
|
|
|
|
- public boolean disconnectAllPlayersWithProfile(GameProfile gameprofile) {
|
|
|
|
|
+ public boolean disconnectAllPlayersWithProfile(GameProfile gameprofile, EntityPlayer player) { // CraftBukkit - added EntityPlayer
|
|
|
|
|
+ /* CraftBukkit startMoved up
|
|
|
|
|
UUID uuid = gameprofile.getId();
|
|
|
|
|
Set<EntityPlayer> set = Sets.newIdentityHashSet();
|
|
|
|
|
Iterator iterator = this.players.iterator();
|
|
|
|
|
@@ -480,14 +659,24 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return new EntityPlayer(this.server, this.server.overworld(), gameprofile);
|
|
|
|
|
return !set.isEmpty();
|
|
|
|
|
+ */
|
|
|
|
|
+ return player;
|
|
|
|
|
+ return player == null;
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
@@ -437,10 +446,10 @@
|
|
|
|
|
WorldServer worldserver = this.server.getLevel(entityplayer.getRespawnDimension());
|
|
|
|
|
Optional optional;
|
|
|
|
|
|
|
|
|
|
@@ -506,6 +692,11 @@
|
|
|
|
|
@@ -499,6 +688,11 @@
|
|
|
|
|
|
|
|
|
|
WorldServer worldserver1 = worldserver != null && optional.isPresent() ? worldserver : this.server.overworld();
|
|
|
|
|
EntityPlayer entityplayer1 = new EntityPlayer(this.server, worldserver1, entityplayer.getGameProfile());
|
|
|
|
|
EntityPlayer entityplayer1 = new EntityPlayer(this.server, worldserver1, entityplayer.getGameProfile(), entityplayer.clientInformation());
|
|
|
|
|
+ // */
|
|
|
|
|
+ EntityPlayer entityplayer1 = entityplayer;
|
|
|
|
|
+ org.bukkit.World fromWorld = entityplayer.getBukkitEntity().getWorld();
|
|
|
|
|
@@ -449,7 +458,7 @@
|
|
|
|
|
|
|
|
|
|
entityplayer1.connection = entityplayer.connection;
|
|
|
|
|
entityplayer1.restoreFrom(entityplayer, flag);
|
|
|
|
|
@@ -521,50 +712,112 @@
|
|
|
|
|
@@ -514,28 +708,66 @@
|
|
|
|
|
|
|
|
|
|
boolean flag2 = false;
|
|
|
|
|
|
|
|
|
|
@@ -521,27 +530,23 @@
|
|
|
|
|
+ location.setWorld(worldserver.getWorld());
|
|
|
|
|
}
|
|
|
|
|
+ WorldServer worldserver1 = ((CraftWorld) location.getWorld()).getHandle();
|
|
|
|
|
+ entityplayer1.spawnIn(worldserver1);
|
|
|
|
|
+ entityplayer1.unsetRemoved();
|
|
|
|
|
+ entityplayer1.setShiftKeyDown(false);
|
|
|
|
|
+ entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
|
|
|
|
|
- while (!worldserver1.noCollision((Entity) entityplayer1) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) {
|
|
|
|
|
+ while (avoidSuffocation && !worldserver1.noCollision((Entity) entityplayer1) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) {
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int i = flag ? 1 : 0;
|
|
|
|
|
- WorldData worlddata = entityplayer1.level().getLevelData();
|
|
|
|
|
+ // CraftBukkit start
|
|
|
|
|
+ WorldData worlddata = worldserver1.getLevelData();
|
|
|
|
|
+ entityplayer1.connection.send(new PacketPlayOutRespawn(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation(), entityplayer1.getPortalCooldown()));
|
|
|
|
|
+ entityplayer1.spawnIn(worldserver1);
|
|
|
|
|
+ entityplayer1.unsetRemoved();
|
|
|
|
|
+ entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
|
|
|
|
+ entityplayer1.setShiftKeyDown(false);
|
|
|
|
|
@@ -544,21 +776,43 @@
|
|
|
|
|
WorldData worlddata = worldserver2.getLevelData();
|
|
|
|
|
|
|
|
|
|
- entityplayer1.connection.send(new PacketPlayOutRespawn(entityplayer1.level().dimensionTypeId(), entityplayer1.level().dimension(), BiomeManager.obfuscateSeed(entityplayer1.serverLevel().getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), entityplayer1.level().isDebug(), entityplayer1.serverLevel().isFlat(), (byte) i, entityplayer1.getLastDeathLocation(), entityplayer1.getPortalCooldown()));
|
|
|
|
|
entityplayer1.connection.send(new PacketPlayOutRespawn(entityplayer1.createCommonSpawnInfo(worldserver2), (byte) i));
|
|
|
|
|
- entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot());
|
|
|
|
|
+ // entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot());
|
|
|
|
|
+ entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver2.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); // CraftBukkit
|
|
|
|
|
entityplayer1.connection.send(new PacketPlayOutSpawnPosition(worldserver1.getSharedSpawnPos(), worldserver1.getSharedSpawnAngle()));
|
|
|
|
|
entityplayer1.connection.send(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
|
|
|
|
|
entityplayer1.connection.send(new PacketPlayOutExperience(entityplayer1.experienceProgress, entityplayer1.totalExperience, entityplayer1.experienceLevel));
|
|
|
|
|
@@ -570,13 +575,13 @@
|
|
|
|
|
+
|
|
|
|
|
+ // Fire advancement trigger
|
|
|
|
|
+ entityplayer.triggerDimensionChangeTriggers(((CraftWorld) fromWorld).getHandle());
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // Don't fire on respawn
|
|
|
|
|
+ if (fromWorld != location.getWorld()) {
|
|
|
|
|
+ PlayerChangedWorldEvent event = new PlayerChangedWorldEvent(entityplayer.getBukkitEntity(), fromWorld);
|
|
|
|
|
+ server.server.getPluginManager().callEvent(event);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
+ // Save player file again if they were disconnected
|
|
|
|
|
+ if (entityplayer.connection.isDisconnected()) {
|
|
|
|
|
+ this.save(entityplayer);
|
|
|
|
|
@@ -585,7 +590,7 @@
|
|
|
|
|
return entityplayer1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -577,7 +830,18 @@
|
|
|
|
|
@@ -571,7 +825,18 @@
|
|
|
|
|
|
|
|
|
|
public void tick() {
|
|
|
|
|
if (++this.sendAllPlayerInfoIn > 600) {
|
|
|
|
|
@@ -605,7 +610,7 @@
|
|
|
|
|
this.sendAllPlayerInfoIn = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -594,6 +858,25 @@
|
|
|
|
|
@@ -588,6 +853,25 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -631,7 +636,7 @@
|
|
|
|
|
public void broadcastAll(Packet<?> packet, ResourceKey<World> resourcekey) {
|
|
|
|
|
Iterator iterator = this.players.iterator();
|
|
|
|
|
|
|
|
|
|
@@ -672,7 +955,7 @@
|
|
|
|
|
@@ -666,7 +950,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deop(GameProfile gameprofile) {
|
|
|
|
|
@@ -640,7 +645,7 @@
|
|
|
|
|
EntityPlayer entityplayer = this.getPlayer(gameprofile.getId());
|
|
|
|
|
|
|
|
|
|
if (entityplayer != null) {
|
|
|
|
|
@@ -696,6 +979,7 @@
|
|
|
|
|
@@ -690,6 +974,7 @@
|
|
|
|
|
entityplayer.connection.send(new PacketPlayOutEntityStatus(entityplayer, b0));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -648,7 +653,7 @@
|
|
|
|
|
this.server.getCommands().sendCommands(entityplayer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -728,6 +1012,12 @@
|
|
|
|
|
@@ -722,6 +1007,12 @@
|
|
|
|
|
for (int i = 0; i < this.players.size(); ++i) {
|
|
|
|
|
EntityPlayer entityplayer = (EntityPlayer) this.players.get(i);
|
|
|
|
|
|
|
|
|
|
@@ -661,7 +666,7 @@
|
|
|
|
|
if (entityplayer != entityhuman && entityplayer.level().dimension() == resourcekey) {
|
|
|
|
|
double d4 = d0 - entityplayer.getX();
|
|
|
|
|
double d5 = d1 - entityplayer.getY();
|
|
|
|
|
@@ -767,23 +1057,35 @@
|
|
|
|
|
@@ -761,23 +1052,35 @@
|
|
|
|
|
public void reloadWhiteList() {}
|
|
|
|
|
|
|
|
|
|
public void sendLevelInfo(EntityPlayer entityplayer, WorldServer worldserver) {
|
|
|
|
|
@@ -702,7 +707,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getPlayerCount() {
|
|
|
|
|
@@ -839,12 +1141,22 @@
|
|
|
|
|
@@ -833,12 +1136,22 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void removeAll() {
|
|
|
|
|
@@ -727,7 +732,7 @@
|
|
|
|
|
public void broadcastSystemMessage(IChatBaseComponent ichatbasecomponent, boolean flag) {
|
|
|
|
|
this.broadcastSystemMessage(ichatbasecomponent, (entityplayer) -> {
|
|
|
|
|
return ichatbasecomponent;
|
|
|
|
|
@@ -902,16 +1214,23 @@
|
|
|
|
|
@@ -896,16 +1209,23 @@
|
|
|
|
|
return playerchatmessage.hasSignature() && !playerchatmessage.hasExpiredServer(Instant.now());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -755,7 +760,7 @@
|
|
|
|
|
Path path = file2.toPath();
|
|
|
|
|
|
|
|
|
|
if (FileUtils.isPathNormalized(path) && FileUtils.isPathPortable(path) && path.startsWith(file.getPath()) && file2.isFile()) {
|
|
|
|
|
@@ -920,7 +1239,7 @@
|
|
|
|
|
@@ -914,7 +1234,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverstatisticmanager = new ServerStatisticManager(this.server, file1);
|
|
|
|
|
@@ -764,7 +769,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return serverstatisticmanager;
|
|
|
|
|
@@ -928,13 +1247,13 @@
|
|
|
|
|
@@ -922,13 +1242,13 @@
|
|
|
|
|
|
|
|
|
|
public AdvancementDataPlayer getPlayerAdvancements(EntityPlayer entityplayer) {
|
|
|
|
|
UUID uuid = entityplayer.getUUID();
|
|
|
|
|
@@ -780,7 +785,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
advancementdataplayer.setPlayer(entityplayer);
|
|
|
|
|
@@ -985,13 +1304,20 @@
|
|
|
|
|
@@ -979,13 +1299,20 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void reloadResources() {
|
|
|
|
|
@@ -800,5 +805,5 @@
|
|
|
|
|
}
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
|
|
|
|
|
this.broadcastAll(new PacketPlayOutTags(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
|
|
|
|
|
this.broadcastAll(new ClientboundUpdateTagsPacket(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
|
|
|
|
|
PacketPlayOutRecipeUpdate packetplayoutrecipeupdate = new PacketPlayOutRecipeUpdate(this.server.getRecipeManager().getRecipes());
|
|
|
|
|
|