@@ -104,6 +104,6 @@ public class CraftProfileBanList implements org.bukkit.BanList {
|
||||
//
|
||||
}
|
||||
|
||||
return (uuid != null) ? MinecraftServer.getServer().getUserCache().getProfile(uuid) : MinecraftServer.getServer().getUserCache().getProfile(target);
|
||||
return ((uuid != null) ? MinecraftServer.getServer().getUserCache().getProfile(uuid) : MinecraftServer.getServer().getUserCache().getProfile(target)).orElse(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1051,7 +1051,7 @@ public final class CraftServer implements Server {
|
||||
console.levels.put(internal.getDimensionKey(), internal);
|
||||
|
||||
getServer().loadSpawn(internal.getChunkProvider().chunkMap.progressListener, internal);
|
||||
internal.entityManager.a(); // SPIGOT-6526: Load pending entities so they are available to the API
|
||||
internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
|
||||
|
||||
pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
|
||||
return internal.getWorld();
|
||||
@@ -1362,7 +1362,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
net.minecraft.world.level.World minecraftWorld = ((CraftWorld) world).getHandle();
|
||||
// creates a new map at world spawn with the scale of 3, with out tracking position and unlimited tracking
|
||||
int newId = ItemWorldMap.a(minecraftWorld, minecraftWorld.getWorldData().a(), minecraftWorld.getWorldData().c(), 3, false, false, minecraftWorld.getDimensionKey());
|
||||
int newId = ItemWorldMap.createNewSavedData(minecraftWorld, minecraftWorld.getWorldData().a(), minecraftWorld.getWorldData().c(), 3, false, false, minecraftWorld.getDimensionKey());
|
||||
return minecraftWorld.a(ItemWorldMap.a(newId)).mapView;
|
||||
}
|
||||
|
||||
@@ -1429,7 +1429,7 @@ public final class CraftServer implements Server {
|
||||
OfflinePlayer result = getPlayerExact(name);
|
||||
if (result == null) {
|
||||
// This is potentially blocking :(
|
||||
GameProfile profile = console.getUserCache().getProfile(name);
|
||||
GameProfile profile = console.getUserCache().getProfile(name).orElse(null);
|
||||
if (profile == null) {
|
||||
// Make an OfflinePlayer using an offline mode UUID since the name has no profile
|
||||
result = getOfflinePlayer(new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
|
||||
@@ -1520,12 +1520,12 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isWhitelistEnforced() {
|
||||
return console.aN();
|
||||
return console.isEnforceWhitelist();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWhitelistEnforced(boolean value) {
|
||||
console.h(value);
|
||||
console.setEnforceWhitelist(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -181,7 +181,7 @@ public class Main {
|
||||
useConsole = false;
|
||||
}
|
||||
|
||||
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
|
||||
return false;
|
||||
}
|
||||
|
||||
GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(name);
|
||||
GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(name).orElse(null);
|
||||
if (profile == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CraftAnimals extends CraftAgeable implements Animals {
|
||||
|
||||
@Override
|
||||
public boolean isBreedItem(ItemStack itemStack) {
|
||||
return getHandle().n(CraftItemStack.asNMSCopy(itemStack));
|
||||
return getHandle().isBreedItem(CraftItemStack.asNMSCopy(itemStack));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -580,7 +580,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
@Override
|
||||
public boolean dropItem(boolean dropAll) {
|
||||
return getHandle().dropItem(dropAll);
|
||||
if (!(getHandle() instanceof EntityPlayer)) return false;
|
||||
return ((EntityPlayer) getHandle()).dropItem(dropAll);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -110,7 +110,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
|
||||
} else if (index > 35) {
|
||||
index = 8 - (index - 36);
|
||||
}
|
||||
player.connection.sendPacket(new PacketPlayOutSetSlot(player.inventoryMenu.containerId, index, CraftItemStack.asNMSCopy(item)));
|
||||
player.connection.sendPacket(new PacketPlayOutSetSlot(player.inventoryMenu.containerId, player.inventoryMenu.incrementStateId(), index, CraftItemStack.asNMSCopy(item)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -224,7 +224,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
* @return string
|
||||
*/
|
||||
public String getMappingsVersion() {
|
||||
return "acd6e6c27e5a0a9440afba70a96c27c9";
|
||||
return "f0e3dfc7390de285a4693518dd5bd126";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ public final class CraftVoxelShape implements org.bukkit.util.VoxelShape {
|
||||
|
||||
@Override
|
||||
public Collection<BoundingBox> getBoundingBoxes() {
|
||||
List<AxisAlignedBB> boxes = shape.d(); // PAIL rename toList
|
||||
List<AxisAlignedBB> boxes = shape.toList();
|
||||
List<BoundingBox> craftBoxes = new ArrayList<>(boxes.size());
|
||||
for (AxisAlignedBB aabb : boxes) {
|
||||
craftBoxes.add(new BoundingBox(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ));
|
||||
|
||||
Reference in New Issue
Block a user