Remove several broken or unnecessary patches.

Removes PlayerMicroMoveEvent API, the ability to disable the AsyncCatcher, and the TeleportPassengerVehicleWithPlayer patch
This commit is contained in:
Zach Brown 2015-09-12 19:57:39 -05:00
parent 7e89c54e7c
commit 603159dedf
38 changed files with 37 additions and 288 deletions

View File

@ -91,6 +91,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return handlers;
+ }
+}
--
1.9.5.msysgit.1
--

View File

@ -1,47 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 23 Jul 2015 03:19:57 -0700
Subject: [PATCH] Add PlayerMicroMoveEvent
diff --git a/src/main/java/org/github/paperspigot/event/player/PlayerMicroMoveEvent.java b/src/main/java/org/github/paperspigot/event/player/PlayerMicroMoveEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/org/github/paperspigot/event/player/PlayerMicroMoveEvent.java
@@ -0,0 +0,0 @@
+package org.github.paperspigot.event.player;
+
+import org.bukkit.Location;
+import org.bukkit.entity.Player;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerMoveEvent;
+
+/**
+ * This event is fired for player movements that are too small to track with PlayerMoveEvent.
+ *
+ * When used in combination with PlayerMoveEvent, it is possible to keep track of all
+ * PacketPlayInFlying movements. This can be particularly useful for anti-cheat plugins.
+ *
+ * Please note this event is not intended for casual use. Plugins that casually use this event
+ * may cause significant overhead depending on handler logic.
+ */
+public class PlayerMicroMoveEvent extends PlayerMoveEvent {
+ private static final HandlerList handlerList = new HandlerList();
+
+ public PlayerMicroMoveEvent(Player player, Location from, Location to) {
+ super(player, from, to);
+ }
+
+ @Override
+ public HandlerList getHandlers() {
+ return getHandlerList();
+ }
+
+ public static HandlerList getHandlerList() {
+ return handlerList;
+ }
+}
--
1.9.5.msysgit.1

View File

@ -1,39 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Sat, 7 Mar 2015 20:46:54 -0600
Subject: [PATCH] Ability to disable asynccatcher
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotConfig
{
babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
}
+
+ public static boolean asyncCatcherFeature;
+ private static void asyncCatcherFeature()
+ {
+ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true );
+ if ( !asyncCatcherFeature )
+ {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
+ }
+ }
}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer;
public class AsyncCatcher
{
- public static boolean enabled = true;
+ public static boolean enabled = org.github.paperspigot.PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - Allow disabling of AsyncCatcher from PaperSpigotConfig
public static void catchOp(String reason)
{
--

View File

@ -140,6 +140,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // PaperSpigot end
}
--
1.9.5.msysgit.1
--

View File

@ -40,6 +40,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // PaperSpigot end
}
--
1.9.5.msysgit.1
--

View File

@ -33,6 +33,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public Chunk getChunkAt(int x, int z) {
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
}
--
1.9.5.msysgit.1
--

View File

@ -41,6 +41,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.a(4);
((Navigation) entityinsentient.getNavigation()).d(true);
}
--
1.9.5.msysgit.1
--

View File

@ -63,6 +63,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -24,6 +24,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|| entity instanceof EntityEnderCrystal
|| entity instanceof EntityFireworks )
{
--
1.9.5.msysgit.1
--

View File

@ -17,6 +17,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
{
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
--
1.9.5.msysgit.1
--

View File

@ -135,6 +135,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ cacheChunkMaps = getBoolean( "cache-chunk-maps", false );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -88,6 +88,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ disableEndCredits = getBoolean( "game-mechanics.disable-end-credits", false );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -77,6 +77,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -35,6 +35,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ lavaFlowSpeedNether = getInt( "lava-flow-speed.nether", 10 );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -50,7 +50,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index 8e5de323..12697ff 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
@ -64,6 +64,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ mobSpawnerTickRate = getInt( "mob-spawner-tick-rate", 1 );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -57,6 +57,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -32,6 +32,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ disableIceAndSnow = getBoolean( "disable-ice-and-snow", false );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
int k = this.m >> 2;
int l = k & 15;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index 0000000000000000000000000000000000000000..00000000000000000000000000000000000000003 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig

View File

@ -32,6 +32,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ disableThunder = getBoolean( "disable-thunder", false );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -88,6 +88,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -22,6 +22,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
public void setCarried(IBlockData iblockdata) {
--
1.9.5.msysgit.1
--

View File

@ -96,6 +96,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ fastDrainWater = getBoolean( "fast-drain.water", false );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -16,6 +16,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
<archive>
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
--
1.9.5.msysgit.1
--

View File

@ -24,6 +24,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Vec3D vec3d = new Vec3D(this.posX, this.posY, this.posZ);
for (int l1 = 0; l1 < list.size(); ++l1) {
--
1.9.5.msysgit.1
--

View File

@ -72,6 +72,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -23,6 +23,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
@Override
--
1.9.5.msysgit.1
--

View File

@ -83,6 +83,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
update.startTiming();
updateNearbyBlocks( world, position, 2, false ); // 2 is the radius, we shouldn't change it as that would make it exponentially slower
update.stopTiming();
--
1.9.5.msysgit.1
--

View File

@ -261,6 +261,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+}
\ No newline at end of file
--
1.9.5.msysgit.1
--

View File

@ -24,6 +24,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
}
} else {
--
1.9.5.msysgit.1
--

View File

@ -197,6 +197,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
};
public Player.Spigot spigot()
--
1.9.5.msysgit.1
--

View File

@ -63,6 +63,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
// Spigot start
finally {
--
1.9.5.msysgit.1
--

View File

@ -36,6 +36,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
+ }
}
--
1.9.5.msysgit.1
--

View File

@ -83,6 +83,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.trackedPlayers.add(entityplayer);
Packet packet = this.c();
--
1.9.5.msysgit.1
--

View File

@ -18,6 +18,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
public CrashReport b(CrashReport crashreport) {
--
1.9.5.msysgit.1
--

View File

@ -16,6 +16,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
IBlockData iblockdata2 = world.getType(blockposition.down());
if (this.h(world, blockposition.down(), iblockdata2)) {
--
1.9.5.msysgit.1
--

View File

@ -1,99 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 31 May 2015 01:44:02 -0500
Subject: [PATCH] Teleport passenger/vehicle with player
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
}
// CraftBukikt end
+ // PaperSpigot start - Teleport passenger/vehicle with player
+ public void retrack() {
+ final EntityTracker entityTracker = ((WorldServer) world).getTracker();
+ entityTracker.untrackEntity(this);
+ entityTracker.track(this);
+
+ }
+ // PaperSpigot end
+
private static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
private static int entityCount;
private int id;
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
// minecraftserver.getPlayerList().changeWorld(this, j, worldserver, worldserver1);
boolean before = worldserver1.chunkProviderServer.forceChunkLoad;
worldserver1.chunkProviderServer.forceChunkLoad = true;
- worldserver1.getMinecraftServer().getPlayerList().repositionEntity(this, exit, portal);
+ //worldserver1.getMinecraftServer().getPlayerList().repositionEntity(this, exit, portal); // PaperSpigot - Teleport passenger/vehicle with player, no... this entity is dead;
worldserver1.chunkProviderServer.forceChunkLoad = before;
// CraftBukkit end
this.world.methodProfiler.c("reloading");
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
if (entity != null) {
entity.n(this);
+
+ // PaperSpigot start - Teleport passenger/vehicle with player, move entity to new location
+ exit.getBlock(); // force load
+ entity.setLocation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch());
+ // PaperSpigot end
+
/* CraftBukkit start - We need to do this...
if (j == 1 && i == 1) {
BlockPosition blockposition = this.world.r(worldserver1.getSpawn());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/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 {
}
// If this player is riding another entity, we must dismount before teleporting.
- entity.mount(null);
+ // PaperSpigot start - Teleport passenger/vehicle with player
+ //entity.mount(null);
+
+ Entity vehicle = entity.vehicle;
+ Entity passenger = entity.passenger;
+ if (vehicle != null) {
+ vehicle.passenger = null;
+ vehicle.teleportTo(location, false);
+ vehicle = vehicle.getBukkitEntity().getHandle();
+ entity.vehicle = vehicle;
+ vehicle.passenger = entity;
+ }
+
+ if (passenger != null) {
+ passenger.vehicle = null;
+ passenger.teleportTo(location, false);
+ passenger = passenger.getBukkitEntity().getHandle();
+ entity.passenger = passenger;
+ passenger.vehicle = entity;
+ }
+ // PaperSpigot end
// Update the From Location
from = event.getFrom();
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} else {
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
}
+
+ // PaperSpigot start - Teleport passenger/vehicle with player
+ if (vehicle != null) {
+ vehicle.retrack();
+ //entity.retrack();
+ }
+ if (passenger != null) {
+ passenger.retrack();
+ }
+ // PaperSpigot end
return true;
}
--

View File

@ -23,8 +23,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotConfig
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
}
{
babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
}
+
+ public static boolean interactLimitEnabled;

View File

@ -33,6 +33,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
public boolean netherVoidTopDamage;
--
1.9.5.msysgit.1
--