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

@ -92,5 +92,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+}
--
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

@ -141,5 +141,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // PaperSpigot end
}
--
1.9.5.msysgit.1

View File

@ -41,5 +41,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // PaperSpigot end
}
--
1.9.5.msysgit.1

View File

@ -34,5 +34,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
}
--
1.9.5.msysgit.1

View File

@ -42,5 +42,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
((Navigation) entityinsentient.getNavigation()).d(true);
}
--
1.9.5.msysgit.1

View File

@ -64,5 +64,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -25,5 +25,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|| entity instanceof EntityFireworks )
{
--
1.9.5.msysgit.1

View File

@ -18,5 +18,3 @@ 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

@ -136,5 +136,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -89,5 +89,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -78,5 +78,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -36,5 +36,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
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
@ -65,5 +65,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -58,5 +58,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -33,5 +33,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
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

@ -33,5 +33,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -89,5 +89,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -23,5 +23,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void setCarried(IBlockData iblockdata) {
--
1.9.5.msysgit.1

View File

@ -97,5 +97,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -17,5 +17,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
--
1.9.5.msysgit.1

View File

@ -25,5 +25,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
for (int l1 = 0; l1 < list.size(); ++l1) {
--
1.9.5.msysgit.1

View File

@ -73,5 +73,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -24,5 +24,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Override
--
1.9.5.msysgit.1

View File

@ -84,5 +84,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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

@ -262,5 +262,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+}
\ No newline at end of file
--
1.9.5.msysgit.1

View File

@ -25,5 +25,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
} else {
--
1.9.5.msysgit.1

View File

@ -198,5 +198,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public Player.Spigot spigot()
--
1.9.5.msysgit.1

View File

@ -64,5 +64,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// Spigot start
finally {
--
1.9.5.msysgit.1

View File

@ -37,5 +37,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
}
--
1.9.5.msysgit.1

View File

@ -84,5 +84,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
Packet packet = this.c();
--
1.9.5.msysgit.1

View File

@ -19,5 +19,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public CrashReport b(CrashReport crashreport) {
--
1.9.5.msysgit.1

View File

@ -17,5 +17,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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

@ -34,5 +34,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public boolean netherVoidTopDamage;
--
1.9.5.msysgit.1