diff --git a/Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch index d36fae44ed..b4c2234f73 100644 --- a/Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch +++ b/Spigot-Server-Patches/0046-Add-BeaconEffectEvent.patch @@ -1,20 +1,19 @@ -From ec66ca6a5947ee2ead5f18eb00767ef7f8ae0b7f Mon Sep 17 00:00:00 2001 +From a73b6bfd3a69352a8bf17b618de3549a8a32dbc4 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 23:30:53 -0600 Subject: [PATCH] Add BeaconEffectEvent diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java -index 660e2e5..220eb82 100644 +index 48f8793..9b0a1c4 100644 --- a/src/main/java/net/minecraft/server/TileEntityBeacon.java +++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java -@@ -14,6 +14,15 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; - import org.bukkit.entity.HumanEntity; +@@ -16,6 +16,14 @@ import org.bukkit.entity.HumanEntity; + import org.bukkit.potion.PotionEffect; // CraftBukkit end +// Paper start +import org.bukkit.craftbukkit.event.CraftEventFactory; -+import org.bukkit.craftbukkit.potion.CraftPotionUtil; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionData; +import org.bukkit.potion.PotionEffect; @@ -24,42 +23,51 @@ index 660e2e5..220eb82 100644 public class TileEntityBeacon extends TileEntityContainer implements ITickable, IWorldInventory { public static final MobEffectList[][] a = new MobEffectList[][] { { MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, { MobEffects.RESISTANCE, MobEffects.JUMP}, { MobEffects.INCREASE_DAMAGE}, { MobEffects.REGENERATION}}; -@@ -88,17 +97,33 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, +@@ -114,14 +122,30 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, + } + + private void applyEffect(List list, MobEffectList effects, int i, int b0) { ++ // Paper - BeaconEffectEvent ++ applyEffect(list, effects, i, b0, true); ++ } ++ ++ private void applyEffect(List list, MobEffectList effects, int i, int b0, boolean isPrimary) { ++ // Paper - BeaconEffectEvent + { + Iterator iterator = list.iterator(); EntityHuman entityhuman; -+ // Paper start ++ // Paper start - BeaconEffectEvent + org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()); -+ PotionEffect primaryEffect = CraftPotionUtil.toBukkit(new MobEffect(this.l, i, b0, true, true)); ++ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffect(effects, i, b0, true, true)); + // Paper end + while (iterator.hasNext()) { entityhuman = (EntityHuman) iterator.next(); -- entityhuman.addEffect(new MobEffect(this.l, i, b0, true, true)); +- entityhuman.addEffect(new MobEffect(effects, i, b0, true, true)); + // Paper start - BeaconEffectEvent -+ BeaconEffectEvent event = new BeaconEffectEvent(block, primaryEffect, (Player) entityhuman.getBukkitEntity(), true); ++ BeaconEffectEvent event = new BeaconEffectEvent(block, effect, (Player) entityhuman.getBukkitEntity(), isPrimary); + if (CraftEventFactory.callEvent(event).isCancelled()) continue; -+ PotionEffect effect = event.getEffect(); -+ entityhuman.getBukkitEntity().addPotionEffect(effect, true); ++ PotionEffect eventEffect = event.getEffect(); ++ entityhuman.getBukkitEntity().addPotionEffect(eventEffect, true); + // Paper end } + } + } +@@ -143,10 +167,10 @@ public class TileEntityBeacon extends TileEntityContainer implements ITickable, + int i = getLevel(); + List list = getHumansInRange(); - if (this.k >= 4 && this.l != this.m && this.m != null) { - iterator = list.iterator(); -+ PotionEffect secondaryEffect = org.bukkit.craftbukkit.potion.CraftPotionUtil.toBukkit(new MobEffect(this.m, i, 0, true, true)); // Paper +- applyEffect(list, this.l, i, b0); ++ applyEffect(list, this.l, i, b0, true); // Paper - BeaconEffectEvent - while (iterator.hasNext()) { - entityhuman = (EntityHuman) iterator.next(); -- entityhuman.addEffect(new MobEffect(this.m, i, 0, true, true)); -+ // Paper start - BeaconEffectEvent -+ BeaconEffectEvent event = new BeaconEffectEvent(block, secondaryEffect, (Player) entityhuman.getBukkitEntity(), false); -+ if (CraftEventFactory.callEvent(event).isCancelled()) continue; -+ PotionEffect effect = event.getEffect(); -+ entityhuman.getBukkitEntity().addPotionEffect(effect, true); -+ // Paper end - } + if (hasSecondaryEffect()) { +- applyEffect(list, this.m, i, 0); ++ applyEffect(list, this.m, i, 0, false); // Paper - BeaconEffectEvent } } + -- -2.8.3 +2.9.0 diff --git a/Spigot-Server-Patches/0057-Add-Location-support-to-tab-completers-vanilla-featu.patch b/Spigot-Server-Patches/0057-Add-Location-support-to-tab-completers-vanilla-featu.patch index 7a3a05d07f..4ad16ca006 100644 --- a/Spigot-Server-Patches/0057-Add-Location-support-to-tab-completers-vanilla-featu.patch +++ b/Spigot-Server-Patches/0057-Add-Location-support-to-tab-completers-vanilla-featu.patch @@ -1,4 +1,4 @@ -From 4f6415f24bde429a493de4e36f769b615d2cf0ed Mon Sep 17 00:00:00 2001 +From a9a860d7ba36c3c64e242508ba5d5b2179a3aa66 Mon Sep 17 00:00:00 2001 From: DemonWav Date: Thu, 3 Mar 2016 01:44:39 -0600 Subject: [PATCH] Add Location support to tab completers (vanilla feature @@ -119,7 +119,7 @@ index e83a422..eb1dc5a 100644 player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command"); getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex); diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java -index 100d84a..a40218c 100644 +index 0930d30..7461d04 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -7,6 +7,7 @@ import net.minecraft.server.*; @@ -130,7 +130,7 @@ index 100d84a..a40218c 100644 import org.bukkit.command.BlockCommandSender; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; -@@ -46,10 +47,23 @@ public final class VanillaCommandWrapper extends VanillaCommand { +@@ -39,10 +40,23 @@ public final class VanillaCommandWrapper extends VanillaCommand { @Override public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { @@ -156,5 +156,5 @@ index 100d84a..a40218c 100644 public static CommandSender lastSender = null; // Nasty :( -- -2.9.0.windows.1 +2.9.0 diff --git a/Spigot-Server-Patches/0117-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0117-Configurable-Keep-Spawn-Loaded-range-per-world.patch index bb65a4f7e7..c11b4d4161 100644 --- a/Spigot-Server-Patches/0117-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0117-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 12cc663c719ad4ee7818a5ecee48c84e4d67af62 Mon Sep 17 00:00:00 2001 +From 138388e6bcda40de657f7031e90f74979868bbd6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -65,10 +65,10 @@ index 91d00dc..7f1caa8 100644 for (int j = -short1; j <= short1; j += 16) { for (int k = -short1; k <= short1; k += 16) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2606890..1994401 100644 +index 0c54005..cf76fd3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1207,8 +1207,9 @@ public class CraftWorld implements World { +@@ -1196,8 +1196,9 @@ public class CraftWorld implements World { int chunkCoordX = chunkcoordinates.getX() >> 4; int chunkCoordZ = chunkcoordinates.getZ() >> 4; // Cycle through the 25x25 Chunks around it to load/unload the chunks. diff --git a/Spigot-Server-Patches/0160-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0160-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 989d92852e..9347521f4c 100644 --- a/Spigot-Server-Patches/0160-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0160-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -1,4 +1,4 @@ -From 8c5533d2f02936af9b92553c6dae717de161f10a Mon Sep 17 00:00:00 2001 +From dfc2ef2e5fbd2e862167bcfe062a7f92d591ec3b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 18 Jun 2016 23:22:12 -0400 Subject: [PATCH] Delay Chunk Unloads based on Player Movement @@ -129,10 +129,10 @@ index 6320247..9fed846 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1994401..f62878d 100644 +index cf76fd3..af2f24a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1491,7 +1491,7 @@ public class CraftWorld implements World { +@@ -1480,7 +1480,7 @@ public class CraftWorld implements World { ChunkProviderServer cps = world.getChunkProviderServer(); for (net.minecraft.server.Chunk chunk : cps.chunks.values()) { // If in use, skip it diff --git a/work/Bukkit b/work/Bukkit index e73ec6b833..c5354dfc26 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit e73ec6b833d245ce3c984d6da1cccb22fbe9f3e5 +Subproject commit c5354dfc2689616b92a74feea44b7fa5ce3238ee diff --git a/work/CraftBukkit b/work/CraftBukkit index f5d891f609..21e3b05522 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit f5d891f609a5b93afbc778aadcd107363477d791 +Subproject commit 21e3b055225dade6100342632f059509ca638c2a