NOT FINISHED! 1.13 pre-7 - Holy moley, more patches!

Really, don't touch! may harm your cat!
This commit is contained in:
Shane Freeder 2018-07-18 19:55:52 +01:00
parent 96f62ca759
commit 37f7038e10
35 changed files with 292 additions and 448 deletions

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login. This will allow you to change the players name or skin on login.
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index eaac25dc3..2842956bf 100644 index 7dbc6f437..02bbb0d1d 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java --- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@

View File

@ -13,7 +13,7 @@ starting point for future additions in this area.
Fixes GH-559 Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index c2f26577c..851960afb 100644 index 6fc0ce050..152a677e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory { @@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory {
@ -26,7 +26,7 @@ index c2f26577c..851960afb 100644
case CHEST: case CHEST:
case TRAPPED_CHEST: case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index cdf16e15a..aa99254ff 100644 index cadff64bf..b1e0d6185 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack { @@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack {
@ -350,23 +350,21 @@ index 000000000..dc372f6db
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 0cdc8007a..2ab4a1cf4 100644 index e43a24989..5bff99edd 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
.put(CraftMetaFirework.class, "FIREWORK")
.put(CraftMetaCharge.class, "FIREWORK_EFFECT") .put(CraftMetaCharge.class, "FIREWORK_EFFECT")
.put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK") .put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK")
.put(CraftMetaTropicalFishBucket.class, "TROPICAL_FISH_BUCKET")
+ .put(CraftMetaArmorStand.class, "ARMOR_STAND") + .put(CraftMetaArmorStand.class, "ARMOR_STAND")
.put(CraftMetaItem.class, "UNSPECIFIC") .put(CraftMetaItem.class, "UNSPECIFIC")
.build(); .build();
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
CraftMetaEnchantedBook.STORED_ENCHANTMENTS.NBT,
CraftMetaCharge.EXPLOSION.NBT,
CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT,
- CraftMetaKnowledgeBook.BOOK_RECIPES.NBT CraftMetaKnowledgeBook.BOOK_RECIPES.NBT,
+ CraftMetaKnowledgeBook.BOOK_RECIPES.NBT, CraftMetaTropicalFishBucket.VARIANT.NBT
+ // Paper start + // Paper start
+ CraftMetaArmorStand.ENTITY_TAG.NBT, + CraftMetaArmorStand.ENTITY_TAG.NBT,
+ CraftMetaArmorStand.INVISIBLE.NBT, + CraftMetaArmorStand.INVISIBLE.NBT,
@ -379,15 +377,14 @@ index 0cdc8007a..2ab4a1cf4 100644
} }
return HANDLED_TAGS; return HANDLED_TAGS;
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index 1f537d584..a29731f1d 100644 index f66cc81d9..eb6cf1bb3 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -0,0 +0,0 @@ import static org.hamcrest.Matchers.*; @@ -0,0 +0,0 @@ import static org.hamcrest.Matchers.*;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
+ +import com.destroystokyo.paper.inventory.meta.ArmorStandMeta; // Paper
+import com.destroystokyo.paper.inventory.meta.ArmorStandMeta;
import net.minecraft.server.Block; import net.minecraft.server.Block;
import net.minecraft.server.ITileEntity; import net.minecraft.server.ITileEntity;
import net.minecraft.server.Item; import net.minecraft.server.Item;
@ -396,14 +393,18 @@ index 1f537d584..a29731f1d 100644
return cleanStack; return cleanStack;
} }
+ }, + },
+ // Paper start
+ new StackProvider(Material.ARMOR_STAND) { + new StackProvider(Material.ARMOR_STAND) {
+ @Override ItemStack operate(ItemStack cleanStack) { + @Override
+ ItemStack operate(ItemStack cleanStack) {
+ final ArmorStandMeta meta = (ArmorStandMeta) cleanStack.getItemMeta(); + final ArmorStandMeta meta = (ArmorStandMeta) cleanStack.getItemMeta();
+ meta.setInvisible(true); + meta.setInvisible(true);
+ cleanStack.setItemMeta(meta); + cleanStack.setItemMeta(meta);
+ return cleanStack; + return cleanStack;
+ } + }
} }
+ // paper end
); );
assertThat("Forgotten test?", providers, hasSize(ItemStackTest.COMPOUND_MATERIALS.length - 4/* Normal item meta, skulls, eggs and tile entities */));
-- --

View File

@ -18,7 +18,7 @@ index 77440ac81..8711462e1 100644
private Vec3D c; private Vec3D c;
private EnumHand d; private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2cc277e4f..b1f483990 100644 index 9c27966ea..5c70a4a9b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {

View File

@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 862b30286..1ac549e5e 100644 index 52de1439e..960ae59ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory; @@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index a0128426f..d85b5defc 100644 index 9e2fc4947..4b9ecb4a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

View File

@ -12,12 +12,12 @@ This disables that by not saving the thrower when the chunk is unloaded.
This is mainly useful for survival servers that do not allow freeform teleporting. This is mainly useful for survival servers that do not allow freeform teleporting.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 99d681ef1..03a9a96fc 100644 index 87d2dd131..5a9c68e4f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -0,0 +0,0 @@ public class PaperWorldConfig {
allowPermaChunkLoaders = getBoolean("game-mechanics.allow-permanent-chunk-loaders", allowPermaChunkLoaders); private void disableSprintInterruptionOnAttack() {
log("Allow Perma Chunk Loaders: " + (allowPermaChunkLoaders ? "enabled" : "disabled")); disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
} }
+ +
+ public boolean disableEnderpearlExploit = true; + public boolean disableEnderpearlExploit = true;
@ -27,15 +27,15 @@ index 99d681ef1..03a9a96fc 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 01c7fcc8b..8e6428a0c 100644 index fc8c0cab5..b3323aa8e 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java --- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile { @@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
if (this.shooterName != null && this.shooterName.isEmpty()) { if (nbttagcompound.hasKeyOfType("owner", 10)) {
this.shooterName = null; this.shooterId = GameProfileSerializer.b(nbttagcompound.getCompound("owner"));
} }
+ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterName = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit + if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterName = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit
this.shooter = this.getShooter();
} }
-- --

View File

@ -84,7 +84,7 @@ index 000000000..74c012fd4
+ +
+} +}
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
index a89a86e6d..2762bcc2e 100644 index 07c53f505..91acfceec 100644
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
@@ -0,0 +0,0 @@ import java.net.InetSocketAddress; @@ -0,0 +0,0 @@ import java.net.InetSocketAddress;
@ -104,7 +104,7 @@ index a89a86e6d..2762bcc2e 100644
switch (i) { switch (i) {
case 0: case 0:
LegacyPingHandler.a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort())); LegacyPingHandler.a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort()));
- s = String.format("%s\u00a7%d\u00a7%d", new Object[] { minecraftserver.getMotd(), Integer.valueOf(minecraftserver.H()), Integer.valueOf(minecraftserver.I())}); - s = String.format("%s\u00a7%d\u00a7%d", new Object[] { minecraftserver.getMotd(), Integer.valueOf(minecraftserver.A()), Integer.valueOf(minecraftserver.B())});
+ // Paper start - Call PaperServerListPingEvent and use results + // Paper start - Call PaperServerListPingEvent and use results
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null); + event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null);
+ if (event == null) { + if (event == null) {
@ -112,15 +112,17 @@ index a89a86e6d..2762bcc2e 100644
+ break; + break;
+ } + }
+ s = String.format("%s\u00a7%d\u00a7%d", PaperLegacyStatusClient.getUnformattedMotd(event), event.getNumPlayers(), event.getMaxPlayers()); + s = String.format("%s\u00a7%d\u00a7%d", PaperLegacyStatusClient.getUnformattedMotd(event), event.getNumPlayers(), event.getMaxPlayers());
+
+ // Paper end + // Paper end
this.a(channelhandlercontext, this.a(s)); this.a(channelhandlercontext, this.a(s));
break; break;
@@ -0,0 +0,0 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter { @@ -0,0 +0,0 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
return;
} }
LegacyPingHandler.a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort())); - LegacyPingHandler.a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort()));
- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { Integer.valueOf(127), minecraftserver.getVersion(), minecraftserver.getMotd(), Integer.valueOf(minecraftserver.H()), Integer.valueOf(minecraftserver.I())}); - s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { Integer.valueOf(127), minecraftserver.getVersion(), minecraftserver.getMotd(), Integer.valueOf(minecraftserver.A()), Integer.valueOf(minecraftserver.B())});
+ // Paper start - Call PaperServerListPingEvent and use results + // Paper start - Call PaperServerListPingEvent and use results
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 61, null); + event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 61, null);
+ if (event == null) { + if (event == null) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Call PortalCreateEvent for exit portals
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index f49729796..42e4b2d01 100644 index 402d8d7d6..f36373450 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -0,0 +0,0 @@ package net.minecraft.server; @@ -0,0 +0,0 @@ package net.minecraft.server;
@ -26,6 +26,13 @@ index f49729796..42e4b2d01 100644
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
// CraftBukkit end // CraftBukkit end
public class PortalTravelAgent {
- private static final BlockPortal a = (BlockPortal) Blocks.NETHER_PORTAL;
+ private static final BlockPortal a = (BlockPortal) Blocks.NETHER_PORTAL; private static final BlockPortal PORTAL_BLOCK = a; // Paper - OBFHELPER
public final WorldServer world; // Paper - private -> public
private final Random c;
private final Long2ObjectMap<PortalTravelAgent.ChunkCoordinatesPortal> d = new Long2ObjectOpenHashMap(4096);
@@ -0,0 +0,0 @@ public class PortalTravelAgent { @@ -0,0 +0,0 @@ public class PortalTravelAgent {
byte b0 = 1; byte b0 = 1;
byte b1 = 0; byte b1 = 0;
@ -68,13 +75,14 @@ index f49729796..42e4b2d01 100644
+ Map<BlockPosition, IBlockData> nmsBlocks = new HashMap<>(); // Paper + Map<BlockPosition, IBlockData> nmsBlocks = new HashMap<>(); // Paper
+ +
if (d0 < 0.0D) { if (d0 < 0.0D) {
i1 = MathHelper.clamp(i1, 70, this.world.ab() - 10); i1 = MathHelper.clamp(i1, 70, this.world.aa() - 10);
j5 = i1; j5 = i1;
@@ -0,0 +0,0 @@ public class PortalTravelAgent { @@ -0,0 +0,0 @@ public class PortalTravelAgent {
l3 = j2 + (l2 - 1) * l5 - k2 * k5; l3 = j2 + (l2 - 1) * l5 - k2 * k5;
boolean flag1 = i3 < 0; boolean flag1 = i3 < 0;
- this.world.setTypeUpdate(new BlockPosition(j3, k3, l3), flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData()); - blockposition_mutableblockposition.c(j3, k3, l3);
- this.world.setTypeUpdate(blockposition_mutableblockposition, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ // Paper start + // Paper start
+ BlockPosition pos = new BlockPosition(j3, k3, l3); + BlockPosition pos = new BlockPosition(j3, k3, l3);
+ nmsBlocks.putIfAbsent(pos, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData()); + nmsBlocks.putIfAbsent(pos, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
@ -84,19 +92,29 @@ index f49729796..42e4b2d01 100644
} }
} }
@@ -0,0 +0,0 @@ public class PortalTravelAgent { @@ -0,0 +0,0 @@ public class PortalTravelAgent {
i4 = j2 + (i3 - 1) * l5; for (l2 = -1; l2 < 4; ++l2) {
boolean flag2 = i3 == 0 || i3 == 3 || j3 == -1 || j3 == 3; if (k2 == -1 || k2 == 2 || l2 == -1 || l2 == 3) {
blockposition_mutableblockposition.c(i5 + k2 * k5, j5 + l2, j2 + k2 * l5);
- this.world.setTypeAndData(new BlockPosition(k3, l3, i4), flag2 ? Blocks.OBSIDIAN.getBlockData() : iblockdata, 2); - this.world.setTypeAndData(blockposition_mutableblockposition, Blocks.OBSIDIAN.getBlockData(), 3);
+ // Paper start + // Paper start
+ BlockPosition pos = new BlockPosition(k3, l3, i4); + BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
+ nmsBlocks.putIfAbsent(pos, flag2 ? Blocks.OBSIDIAN.getBlockData() : iblockdata); + nmsBlocks.putIfAbsent(pos, Blocks.OBSIDIAN.getBlockData());
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ())); + bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // Paper end + // Paper end
} }
} }
}
@@ -0,0 +0,0 @@ public class PortalTravelAgent { @@ -0,0 +0,0 @@ public class PortalTravelAgent {
for (l2 = 0; l2 < 2; ++l2) {
for (i3 = 0; i3 < 3; ++i3) {
blockposition_mutableblockposition.c(i5 + l2 * k5, j5 + i3, j2 + l2 * l5);
- this.world.setTypeAndData(blockposition_mutableblockposition, iblockdata, 18);
+
+ // Paper start
+ BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
+ nmsBlocks.putIfAbsent(pos, PORTAL_BLOCK.getBlockData());
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // paper end
} }
} }

View File

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Apr 2018 11:21:48 -0400
Subject: [PATCH] Configurable Allowance of Permanent Chunk Loaders
This disables the behavior that allows players to keep chunks permanently loaded
by default and allows server operators to enable it if they wish.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 5a2fbf7c7..99d681ef1 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
private void disableSprintInterruptionOnAttack() {
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
}
+
+ public boolean allowPermaChunkLoaders = false;
+ private void allowPermaChunkLoaders() {
+ allowPermaChunkLoaders = getBoolean("game-mechanics.allow-permanent-chunk-loaders", allowPermaChunkLoaders);
+ log("Allow Perma Chunk Loaders: " + (allowPermaChunkLoaders ? "enabled" : "disabled"));
+ }
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 55dada668..0eba3df57 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
}
public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) {
- Chunk chunk = getLoadedChunkAt(i, j);
+ Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders
ChunkRegionLoader loader = null;
if (this.chunkLoader instanceof ChunkRegionLoader) {
--

View File

@ -1,81 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Mar 2018 19:57:10 -0400
Subject: [PATCH] Configurable Unrestricted Signs
Bukkit restricts command execution of signs to test if the sender
has permission to run the specified command. This breaks vanilla
maps that use signs to intentionally run as elevated permission.
Bukkit provides an unrestricted advancements setting, so this setting
compliments that one and allows for unrestricted signs.
We still filter sign update packets to strip out commands at edit phase,
however there is no sanity in ever expecting creative mode to not be
able to create signs with any command.
Creative servers should absolutely never enable this.
Non creative servers, enable at own risk!!!
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index 3f2c5b2d5..67bd3bcbe 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity {
public void load(NBTTagCompound nbttagcompound) {
this.isEditable = false;
super.load(nbttagcompound);
- ICommandListener icommandlistener = new ICommandListener() {
+ ICommandListener icommandlistener = new ISignCommandListener() { // Paper
public String getName() {
return "Sign";
}
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity {
}
public boolean b(final EntityHuman entityhuman) {
- ICommandListener icommandlistener = new ICommandListener() {
+ ICommandListener icommandlistener = new ISignCommandListener() { // Paper
public String getName() {
return entityhuman.getName();
}
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity {
public CommandObjectiveExecutor f() {
return this.i;
}
+ public interface ISignCommandListener extends ICommandListener {} // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e86c16755..6095948e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
private CraftIconCache icon;
private boolean overrideAllCommandBlockCommands = false;
private boolean unrestrictedAdvancements;
+ private boolean unrestrictedSignCommands; // Paper
private final List<CraftPlayer> playerView;
public int reloadCount;
public static Exception excessiveVelEx; // Paper - Velocity warnings
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
saveCommandsConfig();
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
unrestrictedAdvancements = commandsConfiguration.getBoolean("unrestricted-advancements");
+ // Paper start
+ unrestrictedSignCommands = commandsConfiguration.getBoolean("unrestricted-signs");
+ if (unrestrictedSignCommands) {
+ logger.warning("Warning: Commands are no longer restricted on signs. If you allow players to use Creative Mode, there may be risk of players bypassing permissions. Use this setting at your own risk!!!!");
+ }
+ // Paper end
pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling"));
monsterSpawn = configuration.getInt("spawn-limits.monsters");
animalSpawn = configuration.getInt("spawn-limits.animals");
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
listener = ((CommandListenerWrapper) listener).base;
}
+ if (unrestrictedSignCommands && listener instanceof TileEntitySign.ISignCommandListener) return true; // Paper
return unrestrictedAdvancements && listener instanceof AdvancementRewards.AdvancementCommandListener;
}
--

View File

@ -6,21 +6,20 @@ Subject: [PATCH] Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities. If the sprint interruption is disabled players continue sprinting when they attack entities.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ef1fa8cf6..5a2fbf7c7 100644 index 830b99cd7..87d2dd131 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -0,0 +0,0 @@ public class PaperWorldConfig {
disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled"));
} }
+
+ public boolean disableSprintInterruptionOnAttack; + public boolean disableSprintInterruptionOnAttack;
+ private void disableSprintInterruptionOnAttack() { + private void disableSprintInterruptionOnAttack() {
+ disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false); + disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 35fde8b23..0b51903e2 100644 index 02f5d61c8..fc5263f08 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread.
Renable flushing by passing -Dpaper.explicit-flush=true Renable flushing by passing -Dpaper.explicit-flush=true
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index b93a26e8f..3d32e0056 100644 index 424464d09..909ad36fb 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java --- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> { @@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -31,5 +31,5 @@ index b93a26e8f..3d32e0056 100644
+ if (enableExplicitFlush) this.channel.eventLoop().execute(() -> this.channel.flush()); // Paper - we don't need to explicit flush here, but allow opt in incase issues are found to a better version + if (enableExplicitFlush) this.channel.eventLoop().execute(() -> this.channel.flush()); // Paper - we don't need to explicit flush here, but allow opt in incase issues are found to a better version
} }
} if (this.u++ % 20 == 0) {
-- --

View File

@ -6,19 +6,19 @@ Subject: [PATCH] Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index e8ea231dc..4f8dd320f 100644 index a9020083d..a5b517ba9 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java --- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
super.M(); super.mobTick();
} }
+ public boolean teleportRandomly() { return dm(); } // Paper - OBFHELPER + public boolean teleportRandomly() { return dz(); } // Paper - OBFHELPER
protected boolean dm() { protected boolean dz() {
double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D; double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D;
double d1 = this.locY + (double) (this.random.nextInt(64) - 32); double d1 = this.locY + (double) (this.random.nextInt(64) - 32);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
index f602c2313..7e6af5d02 100644 index 5998530a8..f62ea821f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
@@ -0,0 +0,0 @@ public class CraftEnderman extends CraftMonster implements Enderman { @@ -0,0 +0,0 @@ public class CraftEnderman extends CraftMonster implements Enderman {
@ -28,5 +28,5 @@ index f602c2313..7e6af5d02 100644
+ @Override public boolean teleportRandomly() { return getHandle().teleportRandomly(); } // Paper + @Override public boolean teleportRandomly() { return getHandle().teleportRandomly(); } // Paper
public MaterialData getCarriedMaterial() { public MaterialData getCarriedMaterial() {
IBlockData blockData = getHandle().getCarried(); IBlockData blockData = getHandle().getCarried();
return (blockData == null) ? Material.AIR.getNewData((byte) 0) : CraftMagicNumbers.getMaterial(blockData.getBlock()).getNewData((byte) blockData.getBlock().toLegacyData(blockData)); return CraftMagicNumbers.getMaterial(blockData);
-- --

View File

@ -8,18 +8,22 @@ Fires an event anytime an enderman intends to teleport away from the player
You may cancel this, enabling ranged attacks to damage the enderman for example. You may cancel this, enabling ranged attacks to damage the enderman for example.
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index 2f59e7071..e8ea231dc 100644 index 96e29539b..a9020083d 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java --- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
package net.minecraft.server; package net.minecraft.server;
import java.util.Optional;
+import com.destroystokyo.paper.event.entity.EndermanEscapeEvent; +import com.destroystokyo.paper.event.entity.EndermanEscapeEvent;
import com.google.common.base.Function; +import com.google.common.base.Function;
import com.google.common.base.Optional; +import com.google.common.base.Predicate;
import com.google.common.base.Predicate; +
import java.util.Random;
import java.util.UUID;
import java.util.function.Function;
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true); setGoalTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true);
} }
+ // Paper start + // Paper start
@ -32,13 +36,13 @@ index 2f59e7071..e8ea231dc 100644
public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
if (!super.setGoalTarget(entityliving, reason, fireEvent)) { if (!super.setGoalTarget(entityliving, reason, fireEvent)) {
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
if (this.world.D() && this.ticksLived >= this.bA + 600) { if (this.world.K() && this.ticksLived >= this.bE + 600) {
float f = this.aw(); float f = this.az();
- if (f > 0.5F && this.world.h(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { - if (f > 0.5F && this.world.e(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
+ if (f > 0.5F && this.world.h(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper + if (f > 0.5F && this.world.e(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper
this.setGoalTarget((EntityLiving) null); this.setGoalTarget((EntityLiving) null);
this.dm(); this.dz();
} }
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
public boolean damageEntity(DamageSource damagesource, float f) { public boolean damageEntity(DamageSource damagesource, float f) {
@ -47,7 +51,7 @@ index 2f59e7071..e8ea231dc 100644
- } else if (damagesource instanceof EntityDamageSourceIndirect) { - } else if (damagesource instanceof EntityDamageSourceIndirect) {
+ } else if (damagesource instanceof EntityDamageSourceIndirect && tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper + } else if (damagesource instanceof EntityDamageSourceIndirect && tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper
for (int i = 0; i < 64; ++i) { for (int i = 0; i < 64; ++i) {
if (this.dm()) { if (this.dz()) {
return true; return true;
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
} else { } else {
@ -55,7 +59,7 @@ index 2f59e7071..e8ea231dc 100644
- if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0) { - if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0) {
+ if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper + if (damagesource.ignoresArmor() && this.random.nextInt(10) != 0 && tryEscape(damagesource == DamageSource.DROWN ? EndermanEscapeEvent.Reason.DROWN : EndermanEscapeEvent.Reason.CRITICAL_HIT)) { // Paper
this.dm(); this.dz();
} }
@@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster { @@ -0,0 +0,0 @@ public class EntityEnderman extends EntityMonster {
@ -73,7 +77,7 @@ index 2f59e7071..e8ea231dc 100644
if (this.i.f((EntityHuman) this.d)) { if (this.i.f((EntityHuman) this.d)) {
- if (((EntityHuman) this.d).h(this.i) < 16.0D) { - if (((EntityHuman) this.d).h(this.i) < 16.0D) {
+ if (((EntityHuman) this.d).h(this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) { // Paper + if (((EntityHuman) this.d).h(this.i) < 16.0D && this.getEnderman().tryEscape(EndermanEscapeEvent.Reason.STARE)) { // Paper
this.i.dm(); this.i.dz();
} }
-- --

View File

@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
when cancelling interaction. when cancelling interaction.
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 5ec7f5819..fcb64666e 100644 index ce8f76871..126c17d1b 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -0,0 +0,0 @@ public class PlayerInteractManager {
@ -33,16 +33,16 @@ index 5ec7f5819..fcb64666e 100644
+ Block block = data.getBlock(); + Block block = data.getBlock();
+ // Send other half of the door + // Send other half of the door
+ if (block instanceof BlockDoor) { + if (block instanceof BlockDoor) {
+ boolean bottom = data.get(BlockDoor.HALF) == BlockDoor.EnumDoorHalf.LOWER; + boolean bottom = data.get(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER;
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? position.up() : position.down())); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? position.up() : position.down()));
+ } else if (block instanceof BlockTallPlant) { + } else if (block instanceof BlockTallPlant) {
+ boolean bottom = data.get(BlockTallPlant.HALF) == BlockTallPlant.EnumTallPlantHalf.LOWER; + boolean bottom = data.get(BlockTallPlant.HALF) == BlockPropertyDoubleBlockHalf.LOWER;
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? position.up() : position.down())); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? position.up() : position.down()));
+ } else if (block instanceof BlockPistonExtension) { + } else if (block instanceof BlockPistonExtension) {
+ BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite()); + BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite());
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston)); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston));
+ } else if (block instanceof BlockBed) { + } else if (block instanceof BlockBed) {
+ if (data.get(BlockBed.PART) == BlockBed.EnumBedPart.FOOT) { + if (data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT) {
+ // Restore head of bed + // Restore head of bed
+ BlockPosition head = position.shift(data.get(BlockBed.FACING)); + BlockPosition head = position.shift(data.get(BlockBed.FACING));
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, head)); + this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, head));
@ -57,15 +57,15 @@ index 5ec7f5819..fcb64666e 100644
+ // Paper end + // Paper end
+ +
public boolean breakBlock(BlockPosition blockposition) { public boolean breakBlock(BlockPosition blockposition) {
IBlockData iblockdata = this.world.getType(blockposition);
// CraftBukkit start - fire BlockBreakEvent // CraftBukkit start - fire BlockBreakEvent
BlockBreakEvent event = null;
@@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -0,0 +0,0 @@ public class PlayerInteractManager {
} }
// Let the client know the block still exists // Let the client know the block still exists
((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition)); ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
- // Send other half of the door - // Send other half of the door
- if (nmsBlock instanceof BlockDoor) { - if (nmsBlock instanceof BlockDoor) {
- boolean bottom = nmsData.get(BlockDoor.HALF) == BlockDoor.EnumDoorHalf.LOWER; - boolean bottom = nmsData.get(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER;
- ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down())); - ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down()));
- } - }
+ cancelBreakBlock(blockposition, nmsData); // Paper - Move cancellation code to extra "cancelBreakBlock" method + cancelBreakBlock(blockposition, nmsData); // Paper - Move cancellation code to extra "cancelBreakBlock" method
@ -74,14 +74,14 @@ index 5ec7f5819..fcb64666e 100644
if (tileentity != null) { if (tileentity != null) {
@@ -0,0 +0,0 @@ public class PlayerInteractManager { @@ -0,0 +0,0 @@ public class PlayerInteractManager {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down())); ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, bottom ? blockposition.up() : blockposition.down()));
} else if (blockdata.getBlock() instanceof BlockCake) { } else if (iblockdata.getBlock() instanceof BlockCake) {
((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake ((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake
+ // Paper start - extend Player Interact cancellation + // Paper start - extend Player Interact cancellation // TODO: consider merging this into the extracted method
+ } else if (blockdata.getBlock() instanceof BlockStructure) { + } else if (iblockdata.getBlock() instanceof BlockStructure) {
+ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutCloseWindow()); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutCloseWindow());
+ } else if (blockdata.getBlock() instanceof BlockCommand) { + } else if (iblockdata.getBlock() instanceof BlockCommand) {
+ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutCloseWindow()); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutCloseWindow());
+ } else if (blockdata.getBlock() instanceof BlockFlowerPot) { + } else if (iblockdata.getBlock() instanceof BlockFlowerPot) {
+ // Send a block change to air and then send back the correct block, just to make the client happy + // Send a block change to air and then send back the correct block, just to make the client happy
+ PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(this.world, blockposition); + PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(this.world, blockposition);
+ packet.block = Blocks.AIR.getBlockData(); + packet.block = Blocks.AIR.getBlockData();
@ -93,8 +93,9 @@ index 5ec7f5819..fcb64666e 100644
+ if (tileentity != null) { + if (tileentity != null) {
+ player.playerConnection.sendPacket(tileentity.getUpdatePacket()); + player.playerConnection.sendPacket(tileentity.getUpdatePacket());
+ } + }
+ // Paper end - extend Player Interact cancellation
} }
+ // Paper end - extend Player Interact cancellation
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-2867 ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-2867
enuminteractionresult = (event.useItemInHand() != Event.Result.ALLOW) ? EnumInteractionResult.SUCCESS : EnumInteractionResult.PASS; enuminteractionresult = (event.useItemInHand() != Event.Result.ALLOW) ? EnumInteractionResult.SUCCESS : EnumInteractionResult.PASS;
} else if (this.gamemode == EnumGamemode.SPECTATOR) {
-- --

View File

@ -7,11 +7,11 @@ If the dragon tries to find "ground" and hits a hole, or off edge,
it will infinitely keep looking for non air and eventually crash. it will infinitely keep looking for non air and eventually crash.
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
index 054a7ef6c..deee5c4cc 100644 index 41b5a4519..b78d3fe50 100644
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java --- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java +++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
@@ -0,0 +0,0 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded @@ -0,0 +0,0 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
double d2 = this.a.bw.locY + (double) (this.a.bw.length / 2.0F); double d2 = this.a.bD.locY + (double) (this.a.bD.length / 2.0F);
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1)); BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
- while (this.a.world.isEmpty(blockposition_mutableblockposition)) { - while (this.a.world.isEmpty(blockposition_mutableblockposition)) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
index cd7de2b53..37b494b78 100644 index ac81d3f86..f50bae012 100644
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java --- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java +++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder; @@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder;

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 74a665142..4f82d8aae 100644 index d71efd62f..5fe01e7ef 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
String[] lines = new String[4]; String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) { for (int i = 0; i < astring.length; ++i) {
- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a(astring[i])).toPlainText()); - lines[i] = EnumChatFormat.b(new ChatComponentText(EnumChatFormat.b(astring[i])).getString());
+ lines[i] = SharedConstants.a(astring[i]); //Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. + lines[i] = SharedConstants.a(astring[i]); //Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created.
} }
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);

View File

@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk. provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 598b210ce..c0f4cec4d 100644 index 12af78209..3b76c7080 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -26,7 +26,7 @@ index 598b210ce..c0f4cec4d 100644
public void addChannel(String channel) { public void addChannel(String channel) {
- com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot - com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot
+ com.google.common.base.Preconditions.checkState( DISABLE_CHANNEL_LIMIT || channels.size() < 128, "Too many channels registered" ); // Spigot // Paper - flag to disable channel limit + com.google.common.base.Preconditions.checkState( DISABLE_CHANNEL_LIMIT || channels.size() < 128, "Too many channels registered" ); // Spigot // Paper - flag to disable channel limit
channel = StandardMessenger.validateAndCorrectChannel(channel);
if (channels.add(channel)) { if (channels.add(channel)) {
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel)); server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
}
-- --

View File

@ -1,51 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Tue, 17 Apr 2018 21:26:31 -0400
Subject: [PATCH] Handle bad chunks more gracefully
Prior to this change the server would crash when attempting to load a
chunk from a region with bad data.
After this change the server will defer back to vanilla behavior. At
this time, that means attempting to generate a chunk in its place
(and occasionally just not generating anything and leaving small
holes in the world).
Should Mojang choose to alter this behavior in the future, this change
will simply defer to whatever that new behavior is.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index de859ffd1..55dada668 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
return null;
} else {
chunk = ChunkIOExecutor.syncChunkLoad(world, loader, this, i, j);
+
+ // Paper start - If there was an issue loading the chunk from region, stage1 will fail and stage2 will load it sync
+ // all we need to do is fetch an instance
+ if (chunk == null) {
+ chunk = getChunkIfLoaded(i, j);
+ }
+ // Paper end
}
} else if (chunk == null && generate) {
chunk = originalGetChunkAt(i, j);
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index ef9529add..cdf3b614c 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -0,0 +0,0 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
return null;
} catch (IOException ex) {
throw new RuntimeException(ex);
+ // Paper - Mirror vanilla by catching everything (else) rather than immediately crashing the server
+ // stage2 will receive a null chunk and then load it synchronously, where vanilla MC will properly log and recover
+ // stage2 will _not_ however return that instance, only load it
+ } catch (Exception ex) {
+ return null;
}
}
--

View File

@ -177,33 +177,33 @@ index 000000000..350410527
+ +
+} +}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3092913f5..f82e22b23 100644 index 4654e22c8..97581d995 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
if (i - this.Z >= 5000000000L) { if (i - this.Y >= 5000000000L) {
this.Z = i; this.Y = i;
this.q.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.I(), this.H())); this.n.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.B(), this.A()));
- GameProfile[] agameprofile = new GameProfile[Math.min(this.H(), 12)]; - GameProfile[] agameprofile = new GameProfile[Math.min(this.A(), 12)];
+ GameProfile[] agameprofile = new GameProfile[Math.min(this.H(), org.spigotmc.SpigotConfig.playerSample)]; // Paper + GameProfile[] agameprofile = new GameProfile[Math.min(this.A(), org.spigotmc.SpigotConfig.playerSample)]; // Paper
int j = MathHelper.nextInt(this.r, 0, this.H() - agameprofile.length); int j = MathHelper.nextInt(this.o, 0, this.A() - agameprofile.length);
for (int k = 0; k < agameprofile.length; ++k) { for (int k = 0; k < agameprofile.length; ++k) {
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
return "1.12.2"; return "1.13-pre7";
} }
+ public int getPlayerCount() { return H(); } // Paper - OBFHELPER + public int getPlayerCount() { return A(); } // Paper - OBFHELPER
public int H() { public int A() {
return this.v.getPlayerCount(); return this.s.getPlayerCount();
} }
+ public int getMaxPlayers() { return I(); } // Paper - OBFHELPER + public int getMaxPlayers() { return B(); } // Paper - OBFHELPER
public int I() { public int B() {
return this.v.getMaxPlayers(); return this.s.getMaxPlayers();
} }
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
index 313bb0007..f3c25367d 100644 index c9edd289a..8aa121e2f 100644
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java --- a/src/main/java/net/minecraft/server/PacketStatusListener.java
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
@@ -0,0 +0,0 @@ public class PacketStatusListener implements PacketStatusInListener { @@ -0,0 +0,0 @@ public class PacketStatusListener implements PacketStatusInListener {
@ -226,7 +226,7 @@ index 313bb0007..f3c25367d 100644
// CraftBukkit end // CraftBukkit end
} }
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index 981582212..ac161f505 100644 index 2179664a0..616fcbf13 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java --- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -0,0 +0,0 @@ public class ServerPing { @@ -0,0 +0,0 @@ public class ServerPing {
@ -251,7 +251,7 @@ index 981582212..ac161f505 100644
this.c = agameprofile; this.c = agameprofile;
} }
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index cc1f3ac96..4f9fd4bc6 100644 index b39096f04..d89224e7d 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java --- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -0,0 +0,0 @@ public class SpigotConfig @@ -0,0 +0,0 @@ public class SpigotConfig

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Load version history at server start
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 854455711..39a3d46ff 100644 index 7ff2fa535..a329887ce 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer

View File

@ -1,26 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Wed, 4 Apr 2018 21:00:43 -0400
Subject: [PATCH] MC-124833
Conflicting reports of what software this bug does and does not affect.
Given the trivial impact of fixing it and an overabundance of caution,
we'll patch it in Paper as well. This will probably be a short lived
patch, with it being fixed in Vanilla proper 1.13
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java
index 8b806c303..f0d6d6b85 100644
--- a/src/main/java/net/minecraft/server/EntityItemFrame.java
+++ b/src/main/java/net/minecraft/server/EntityItemFrame.java
@@ -0,0 +0,0 @@ public class EntityItemFrame extends EntityHanging {
}
itemstack.a((EntityItemFrame) null);
+
+ // Paper - MC-124833 - conflicting reports of what server software this does and doesn't affect.
+ // It's a one liner with near-zero impact so we'll patch it anyway just in case
+ this.setItem(ItemStack.a); // OBFHELPER - ItemStack.EMPTY
}
}
--

View File

@ -11,15 +11,14 @@ This removes the necessity to disable the cat on chest behavior to improve perfo
now performance will be improved even if you have cat chest detection on. now performance will be improved even if you have cat chest detection on.
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index 90267a1fb..91d3308c1 100644 index 633c75ffe..68cdd3970 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java --- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity { @@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
// Paper end
if (block == this) { if (blockpropertychesttype1 != BlockPropertyChestType.SINGLE && blockpropertychesttype != blockpropertychesttype1 && iblockdata1.get(BlockChest.FACING) == iblockdata.get(BlockChest.FACING)) {
- if (this.e(world, blockposition1)) { if (!flag && this.a(world, blockposition1)) {
+ if (!flag && this.e(world, blockposition1)) { // Paper - check for allowBlocked flag - MC-99321 + //if (!flag && this.e(world, blockposition1)) { // Paper - check for allowBlocked flag - MC-99321
return null; return null;
} }

View File

@ -28,7 +28,7 @@ respond to the request.
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13 [2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
index 4c1a0181a..a89a86e6d 100644 index 41115108f..07c53f505 100644
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java --- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java +++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
@@ -0,0 +0,0 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter { @@ -0,0 +0,0 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {

View File

@ -7,13 +7,25 @@ I don't know why upstream made only the minimum height configurable but
whatever whatever
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 0ddf826f9..9fd76dcc9 100644 index 49f282332..d80cd60ab 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -0,0 +0,0 @@ public class PaperWorldConfig {
} }
log("Max Chunk Sends Per Tick: " + maxChunkSendsPerTick);
} }
+
+ public int maxChunkGensPerTick = 10;
+ private void maxChunkGensPerTick() {
+ maxChunkGensPerTick = getInt("max-chunk-gens-per-tick", maxChunkGensPerTick);
+ if (maxChunkGensPerTick <= 0) {
+ maxChunkGensPerTick = Integer.MAX_VALUE;
+ log("Max Chunk Gens Per Tick: Unlimited (NOT RECOMMENDED)");
+ } else {
+ log("Max Chunk Gens Per Tick: " + maxChunkGensPerTick);
+ }
+ }
+
+ public double squidMaxSpawnHeight; + public double squidMaxSpawnHeight;
+ private void squidMaxSpawnHeight() { + private void squidMaxSpawnHeight() {
+ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); + squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D);
@ -21,18 +33,19 @@ index 0ddf826f9..9fd76dcc9 100644
+ +
} }
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index 0ce16be65..58a902831 100644 index ffc6d0b68..70b251210 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java --- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal {
} }
public boolean P() { public boolean a(GeneratorAccess generatoraccess) {
- return this.locY > this.world.spigotConfig.squidSpawnRangeMin && this.locY < (double) this.world.getSeaLevel() && super.P(); // Spigot - return this.locY > this.world.spigotConfig.squidSpawnRangeMin && this.locY < (double) generatoraccess.getSeaLevel(); // Spigot
+ // Paper - Make max spawn height configurable + // Paper - Make max spawn height configurable
+ final double maxHeight = world.paperConfig.squidMaxSpawnHeight > 0 ? world.paperConfig.squidMaxSpawnHeight : world.getSeaLevel(); + final double maxHeight = world.paperConfig.squidMaxSpawnHeight > 0 ? world.paperConfig.squidMaxSpawnHeight : world.getSeaLevel();
+ return this.locY > this.world.spigotConfig.squidSpawnRangeMin && this.locY < maxHeight && super.P(); // Spigot + return this.locY > this.world.spigotConfig.squidSpawnRangeMin && this.locY < maxHeight; // Spigot
+ // Paper end
} }
public void b(float f, float f1, float f2) { public void c(float f, float f1, float f2) {
-- --

View File

@ -23,7 +23,7 @@ index ec89ecfca..b602bbf12 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index eba1228fd..4e33cc2f2 100644 index a562e1e46..cbfdb3cf7 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -0,0 +0,0 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { @@ -0,0 +0,0 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
@ -33,5 +33,5 @@ index eba1228fd..4e33cc2f2 100644
+ if(!com.destroystokyo.paper.PaperConfig.savePlayerData) return; // Paper - Make player data saving configurable + if(!com.destroystokyo.paper.PaperConfig.savePlayerData) return; // Paper - Make player data saving configurable
try { try {
NBTTagCompound nbttagcompound = entityhuman.save(new NBTTagCompound()); NBTTagCompound nbttagcompound = entityhuman.save(new NBTTagCompound());
File file = new File(this.playerDir, entityhuman.bn() + ".dat.tmp"); File file = new File(this.playerDir, entityhuman.bu() + ".dat.tmp");
-- --

View File

@ -6,20 +6,20 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in. This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4b82e43a8..35fde8b23 100644 index 4fb300468..02f5d61c8 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
protected int bS; protected int bZ;
protected float bT = 0.02F; protected float ca = 0.02F;
private int f; private int g;
- private final GameProfile g; - private final GameProfile h;
+ private GameProfile g; public void setProfile(GameProfile profile) { this.g = profile; } // Paper - OBFHELPER + private final GameProfile h; public void setProfile(GameProfile profile) { this.h = profile; } // Paper - OBFHELPER
private ItemStack bV; private ItemStack cd;
private final ItemCooldown bW; private final ItemCooldown ce;
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 2842956bf..8aeded425 100644 index 02bbb0d1d..e73b07f42 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java --- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable { @@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@ -48,7 +48,7 @@ index 2842956bf..8aeded425 100644
uniqueId = i.getId(); uniqueId = i.getId();
// Paper end // Paper end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 77c50ba14..598b210ce 100644 index c2cd5ac4b..12af78209 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@

View File

@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
index 6896b7095..8913e2744 100644 index 57918d3d6..67556ed32 100644
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
@@ -0,0 +0,0 @@ public class AdvancementDataPlayer { @@ -0,0 +0,0 @@ public class AdvancementDataPlayer {

View File

@ -9,7 +9,7 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index e217d3340..46faa062d 100644 index 8c6c68c9e..e7bf1e5fc 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java --- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -0,0 +0,0 @@ public final class SpawnerCreature {

View File

@ -15,7 +15,7 @@ instead and save a lot of server resources.
See: https://github.com/PaperMC/Paper/issues/917 See: https://github.com/PaperMC/Paper/issues/917
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 87fe4775f..9466bcdc7 100644 index c76dbe74a..b88160a2e 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -27,9 +27,9 @@ index 87fe4775f..9466bcdc7 100644
import java.util.List; import java.util.List;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract { @@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract {
double d3 = j >= 1 ? nbttaglist.f(0) : (double) blockposition.getX() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; double d3 = j >= 1 ? nbttaglist.k(0) : (double) blockposition.getX() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D;
double d4 = j >= 2 ? nbttaglist.f(1) : (double) (blockposition.getY() + world.random.nextInt(3) - 1); double d4 = j >= 2 ? nbttaglist.k(1) : (double) (blockposition.getY() + world.random.nextInt(3) - 1);
double d5 = j >= 3 ? nbttaglist.f(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D; double d5 = j >= 3 ? nbttaglist.k(2) : (double) blockposition.getZ() + (world.random.nextDouble() - world.random.nextDouble()) * (double) this.spawnRange + 0.5D;
+ // Paper start + // Paper start
+ if (this.getMobName() == null) { + if (this.getMobName() == null) {
+ return; + return;
@ -55,16 +55,20 @@ index 87fe4775f..9466bcdc7 100644
if (entity == null) { if (entity == null) {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 2cd063829..e217d3340 100644 index 6d842df62..8c6c68c9e 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java --- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -0,0 +0,0 @@ public final class SpawnerCreature {
}
if (worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition) && a(EntityPositionTypes.a(biomebase_biomemeta.b), worldserver, blockposition_mutableblockposition)) { if (worldserver.a(enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) {
EntityPositionTypes.Surface entitypositiontypes_surface = EntityPositionTypes.a(biomebase_biomemeta.b);
-
if (entitypositiontypes_surface != null && a(entitypositiontypes_surface, worldserver, blockposition_mutableblockposition, biomebase_biomemeta.b)) {
EntityInsentient entityinsentient;
+ // Paper start + // Paper start
+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event; + com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event;
+ Class<? extends EntityInsentient> cls = biomebase_biomemeta.b; + EntityTypes<? extends EntityInsentient> cls = biomebase_biomemeta.b;
+ org.bukkit.entity.EntityType type = EntityTypes.clsToTypeMap.get(cls); + org.bukkit.entity.EntityType type = EntityTypes.clsToTypeMap.get(cls);
+ if (type != null) { + if (type != null) {
+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( + event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent(
@ -73,7 +77,7 @@ index 2cd063829..e217d3340 100644
+ ); + );
+ if (!event.callEvent()) { + if (!event.callEvent()) {
+ if (event.shouldAbortSpawn()) { + if (event.shouldAbortSpawn()) {
+ continue label120; + continue label128; // right above the iterator for c (Chunk Pos Set)
+ } + }
+ j1 += l2; + j1 += l2;
+ ++j4; + ++j4;
@ -81,7 +85,9 @@ index 2cd063829..e217d3340 100644
+ } + }
+ } + }
+ // Paper end + // Paper end
EntityInsentient entityinsentient; +
+
try { try {
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.a((World) worldserver);
} catch (Exception exception) {
-- --

View File

@ -5,28 +5,31 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
index a8dbbf20a..87f40bfcf 100644 index 77cf6b8e9..9d9671eae 100644
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java --- a/src/main/java/net/minecraft/server/BlockIceFrost.java
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java +++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { @@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[j];
EnumDirection enumdirection = aenumdirection[k];
- if (world.getType(blockposition.shift(enumdirection)).getBlock() == this) { blockposition_b.j(blockposition).d(enumdirection);
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition.shift(enumdirection)); // Paper - don't load chunks +
+ if (iblockdata1 == null) continue; // Paper + // Paper start - Prevent Frosted Ice from loading/holding chunks
+ if (iblockdata1.getBlock() == this) { // Paper + if (!world.isChunkLoaded(blockposition_b.getX() >> 4, blockposition_b.getZ() >> 4, true))
++i; + continue;
if (i >= 4) { + // Paper end - Prevent Frosted Ice from loading/holding chunks
return i; +
IBlockData iblockdata1 = world.getType(blockposition_b);
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) {
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce { @@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[l];
EnumDirection enumdirection = aenumdirection[k];
BlockPosition blockposition1 = blockposition.shift(enumdirection);
- IBlockData iblockdata1 = world.getType(blockposition1);
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition1); // Paper - don't load chunks
+ if (iblockdata1 == null) continue; // Paper
if (iblockdata1.getBlock() == this) { blockposition_b.j(blockposition).d(enumdirection);
this.a(world, blockposition1, iblockdata1, random, false); + // Paper start - Prevent Frosted Ice from loading/holding chunks
+ if (!((World) iblockaccess).isChunkLoaded(blockposition_b.getX() >> 4, blockposition_b.getZ() >> 4, true))
+ continue;
+ // Paper end - Prevent Frosted Ice from loading/holding chunks
if (iblockaccess.getType(blockposition_b).getBlock() == this) {
++j;
if (j >= i) {
-- --

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 363e03b65..ef1fa8cf6 100644 index d80cd60ab..830b99cd7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig { @@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -21,14 +21,13 @@ index 363e03b65..ef1fa8cf6 100644
private void allChunksAreSlimeChunks() { private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 347237055..4b82e43a8 100644 index ae4dd621d..4fb300468 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
}
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.m_() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving; boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.z_() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving;
-
+ flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper + flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting(); flag2 = flag2 && !this.isSprinting();
if (flag2) { if (flag2) {

View File

@ -20,28 +20,22 @@ Other changes:
configuration configuration
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index 17bc80776..4dd5fed25 100644 index 17bc80776..f9e225b73 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
<version>${minecraft.version}-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> - <dependency>
- <groupId>jline</groupId> - <groupId>jline</groupId>
- <artifactId>jline</artifactId> - <artifactId>jline</artifactId>
- <version>2.12.1</version> - <version>2.12.1</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
- <version>6.2</version>
+ <groupId>net.sf.jopt-simple</groupId>
+ <artifactId>jopt-simple</artifactId>
+ <version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
<version>3.0.3</version> <version>3.0.3</version>
<scope>compile</scope> <scope>compile</scope>

View File

@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6095948e8..80702f6f6 100644 index d605e5792..0b361d82f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -0,0 +0,0 @@ public final class CraftServer implements Server {