Minecraft 1.9.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-05-10 21:47:39 +10:00
parent c9a6e9175c
commit d506c12c07
236 changed files with 1471 additions and 1822 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/PlayerList.java
+++ b/net/minecraft/server/PlayerList.java
@@ -18,6 +18,26 @@
@@ -19,6 +19,26 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -27,7 +27,7 @@
public abstract class PlayerList {
public static final File a = new File("banned-players.json");
@@ -27,7 +47,7 @@
@@ -28,7 +48,7 @@
private static final Logger f = LogManager.getLogger();
private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
private final MinecraftServer server;
@@ -36,7 +36,7 @@
private final Map<UUID, EntityPlayer> j = Maps.newHashMap();
private final GameProfileBanList k;
private final IpBanList l;
@@ -42,7 +62,15 @@
@@ -43,7 +63,15 @@
private boolean t;
private int u;
@@ -52,7 +52,7 @@
this.k = new GameProfileBanList(PlayerList.a);
this.l = new IpBanList(PlayerList.b);
this.operators = new OpList(PlayerList.c);
@@ -62,6 +90,12 @@
@@ -63,6 +91,12 @@
usercache.a(gameprofile);
NBTTagCompound nbttagcompound = this.a(entityplayer);
@@ -65,7 +65,7 @@
entityplayer.spawnIn(this.server.getWorldServer(entityplayer.dimension));
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
@@ -71,7 +105,8 @@
@@ -72,7 +106,8 @@
s1 = networkmanager.getSocketAddress().toString();
}
@@ -75,7 +75,7 @@
WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension);
WorldData worlddata = worldserver.getWorldData();
BlockPosition blockposition = worldserver.getSpawn();
@@ -80,6 +115,7 @@
@@ -81,6 +116,7 @@
PlayerConnection playerconnection = new PlayerConnection(this.server, networkmanager, entityplayer);
playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), worlddata.isHardcore(), worldserver.worldProvider.getDimensionManager().getDimensionID(), worldserver.getDifficulty(), this.getMaxPlayers(), worlddata.getType(), worldserver.getGameRules().getBoolean("reducedDebugInfo")));
@@ -83,7 +83,7 @@
playerconnection.sendPacket(new PacketPlayOutCustomPayload("MC|Brand", (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName())));
playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
playerconnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
@@ -90,17 +126,23 @@
@@ -91,17 +127,23 @@
entityplayer.getStatisticManager().updateStatistics(entityplayer);
this.sendScoreboard((ScoreboardServer) worldserver.getScoreboard(), entityplayer);
this.server.aC();
@@ -113,7 +113,7 @@
playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
this.b(entityplayer, worldserver);
if (!this.server.getResourcePack().isEmpty()) {
@@ -160,6 +202,8 @@
@@ -161,6 +203,8 @@
}
entityplayer.syncInventory();
@@ -122,7 +122,7 @@
}
public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
@@ -192,26 +236,27 @@
@@ -193,26 +237,27 @@
}
public void setPlayerFileData(WorldServer[] aworldserver) {
@@ -155,7 +155,7 @@
}
public void b(WorldBorder worldborder, double d0) {}
@@ -236,7 +281,7 @@
@@ -237,7 +282,7 @@
}
public NBTTagCompound a(EntityPlayer entityplayer) {
@@ -164,7 +164,7 @@
NBTTagCompound nbttagcompound1;
if (entityplayer.getName().equals(this.server.Q()) && nbttagcompound != null) {
@@ -260,28 +305,70 @@
@@ -261,28 +306,70 @@
}
@@ -241,7 +241,7 @@
this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getVehicle();
@@ -313,13 +400,61 @@
@@ -314,13 +401,61 @@
this.o.remove(uuid);
}
@@ -306,7 +306,7 @@
GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile);
s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason();
@@ -327,10 +462,12 @@
@@ -328,10 +463,12 @@
s = s + "\nYour ban will be removed on " + PlayerList.g.format(gameprofilebanentry.getExpires());
}
@@ -322,7 +322,7 @@
IpBanEntry ipbanentry = this.l.get(socketaddress);
s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason();
@@ -338,13 +475,25 @@
@@ -339,13 +476,25 @@
s = s + "\nYour ban will be removed on " + PlayerList.g.format(ipbanentry.getExpires());
}
@@ -351,7 +351,7 @@
UUID uuid = EntityHuman.a(gameprofile);
ArrayList arraylist = Lists.newArrayList();
@@ -379,17 +528,26 @@
@@ -380,17 +529,26 @@
}
return new EntityPlayer(this.server, this.server.getWorldServer(0), gameprofile, (PlayerInteractManager) object);
@@ -379,7 +379,7 @@
entityplayer.dimension = i;
Object object;
@@ -400,6 +558,11 @@
@@ -401,6 +559,11 @@
}
EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object);
@@ -391,7 +391,7 @@
entityplayer1.playerConnection = entityplayer.playerConnection;
entityplayer1.copyTo(entityplayer, flag);
@@ -414,43 +577,156 @@
@@ -415,43 +578,156 @@
entityplayer1.a(s);
}
@@ -520,7 +520,7 @@
+ Location exit = null;
+ boolean useTravelAgent = false; // don't use agent for custom worlds or return from THE_END
+ if (exitWorld != null) {
+ entityplayer.cj = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
+ entityplayer.ck = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
+ if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
+ // THE_END -> NORMAL; use bed if available, otherwise default spawn
+ exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
@@ -566,7 +566,7 @@
public void f(EntityPlayer entityplayer) {
GameProfile gameprofile = entityplayer.getProfile();
int i = this.isOp(gameprofile) ? this.operators.a(gameprofile) : 0;
@@ -489,12 +765,111 @@
@@ -490,12 +766,111 @@
}
public void changeWorld(Entity entity, int i, WorldServer worldserver, WorldServer worldserver1) {
@@ -678,7 +678,7 @@
if (entity.dimension == -1) {
d0 = MathHelper.a(d0 / d2, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
d1 = MathHelper.a(d1 / d2, worldserver1.getWorldBorder().c() + 16.0D, worldserver1.getWorldBorder().e() - 16.0D);
@@ -513,6 +888,8 @@
@@ -514,6 +889,8 @@
BlockPosition blockposition;
if (i == 1) {
@@ -687,7 +687,7 @@
blockposition = worldserver1.getSpawn();
} else {
blockposition = worldserver1.getDimensionSpawn();
@@ -526,16 +903,27 @@
@@ -527,16 +904,27 @@
worldserver.entityJoinedWorld(entity, false);
}
}
@@ -718,7 +718,7 @@
worldserver1.entityJoinedWorld(entity, false);
}
@@ -543,6 +931,7 @@
@@ -544,6 +932,7 @@
}
entity.spawnIn(worldserver1);
@@ -726,7 +726,7 @@
}
public void tick() {
@@ -560,6 +949,25 @@
@@ -561,6 +950,25 @@
}
@@ -752,7 +752,7 @@
public void a(Packet<?> packet, int i) {
for (int j = 0; j < this.players.size(); ++j) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
@@ -658,11 +1066,23 @@
@@ -659,11 +1067,23 @@
this.operators.add(new OpListEntry(gameprofile, this.server.q(), this.operators.b(gameprofile)));
this.b(this.a(gameprofile.getId()), i);
@@ -776,7 +776,7 @@
}
private void b(EntityPlayer entityplayer, int i) {
@@ -687,7 +1107,7 @@
@@ -688,7 +1108,7 @@
}
public boolean isOp(GameProfile gameprofile) {
@@ -784,8 +784,8 @@
+ return this.operators.d(gameprofile) || this.server.R() && this.server.worlds.get(0).getWorldData().u() && this.server.Q().equalsIgnoreCase(gameprofile.getName()) || this.t; // CraftBukkit
}
public EntityPlayer getPlayer(String s) {
@@ -710,6 +1130,12 @@
@Nullable
@@ -712,6 +1132,12 @@
for (int j = 0; j < this.players.size(); ++j) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
@@ -798,7 +798,7 @@
if (entityplayer != entityhuman && entityplayer.dimension == i) {
double d4 = d0 - entityplayer.locX;
double d5 = d1 - entityplayer.locY;
@@ -757,21 +1183,26 @@
@@ -759,21 +1185,26 @@
public void reloadWhitelist() {}
public void b(EntityPlayer entityplayer, WorldServer worldserver) {
@@ -830,7 +830,7 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
}
@@ -784,7 +1215,7 @@
@@ -786,7 +1217,7 @@
}
public String[] getSeenPlayers() {
@@ -839,7 +839,7 @@
}
public boolean getHasWhitelist() {
@@ -834,16 +1265,26 @@
@@ -836,16 +1267,26 @@
public void u() {
for (int i = 0; i < this.players.size(); ++i) {
@@ -868,7 +868,7 @@
}
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@@ -880,8 +1321,10 @@
@@ -882,8 +1323,10 @@
WorldServer[] aworldserver = this.server.worldServer;
int j = aworldserver.length;