Toggleable player crits, helps mitigate hacked clients. (#1040)
This is a port of https://github.com/PaperMC/Paper/blob/ver/1.8.8/Spigot-Server-Patches/0040-Toggleable-player-crits-helps-mitigate-hacked-client.patch Also adds me to the MIT list.
This commit is contained in:
parent
3da0c30cd1
commit
09692269ca
10 changed files with 140 additions and 99 deletions
|
@ -1,18 +1,17 @@
|
|||
From ccc005acdc20c3e802fd5148cb10b18c674b61a5 Mon Sep 17 00:00:00 2001
|
||||
From 0ed1405b722f13790683af1131a2f730973de468 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 1 Apr 2016 00:02:47 -0400
|
||||
Subject: [PATCH] add Trove and FastUtil to Bukkit
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 360d2f08..c6bdf44e 100644
|
||||
index 4220760..623d9ea 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -55,6 +55,19 @@
|
||||
</repositories>
|
||||
@@ -56,6 +56,19 @@
|
||||
|
||||
<dependencies>
|
||||
+ <dependency>
|
||||
<dependency>
|
||||
+ <groupId>net.sf.trove4j</groupId>
|
||||
+ <artifactId>trove4j</artifactId>
|
||||
+ <version>3.0.3</version>
|
||||
|
@ -25,9 +24,10 @@ index 360d2f08..c6bdf44e 100644
|
|||
+ <version>1.0</version>
|
||||
+ <scope>provided</scope>
|
||||
+ </dependency>
|
||||
<dependency>
|
||||
+ <dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
--
|
||||
2.14.1
|
||||
2.7.4
|
||||
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
From fcbdb6e87df51ee39a544433fea61dc4382325df Mon Sep 17 00:00:00 2001
|
||||
From 09eb3c8e3b1d9927cba4ef385e4a0b331ccac59c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 29 Feb 2016 17:43:33 -0600
|
||||
Subject: [PATCH] Add async chunk load API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 67b0d516..21b2733f 100644
|
||||
index 9b6eb48..561ef0e 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -136,6 +136,78 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
*/
|
||||
@@ -137,6 +137,78 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
||||
public Chunk getChunkAt(Block block);
|
||||
|
||||
+ /**
|
||||
/**
|
||||
+ * Used by {@link World#getChunkAtAsync(Location,ChunkLoadCallback)} methods
|
||||
+ * to request a {@link Chunk} to be loaded, with this callback receiving
|
||||
+ * the chunk when it is finished.
|
||||
|
@ -84,9 +83,10 @@ index 67b0d516..21b2733f 100644
|
|||
+ */
|
||||
+ public void getChunkAtAsync(Block block, ChunkLoadCallback cb);
|
||||
+
|
||||
/**
|
||||
+ /**
|
||||
* Checks if the specified {@link Chunk} is loaded
|
||||
*
|
||||
* @param chunk The chunk to check
|
||||
--
|
||||
2.14.1
|
||||
2.7.4
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 3c8b5f4e36899b160be3c561bb94fbb9e01def01 Mon Sep 17 00:00:00 2001
|
||||
From edd66133aa37abe0e3387c2dd2b0e22e7bfb4f00 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 16 Jul 2013 21:26:50 -0400
|
||||
Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
|
||||
|
@ -6,14 +6,13 @@ Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
|
|||
So that on reload, metadata will be cleared
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
index 64c0f0a7..6da6abd8 100644
|
||||
index 64c0f0a..6da6abd 100644
|
||||
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
@@ -124,6 +124,26 @@ public abstract class MetadataStoreBase<T> {
|
||||
}
|
||||
@@ -125,6 +125,26 @@ public abstract class MetadataStoreBase<T> {
|
||||
}
|
||||
|
||||
+ /**
|
||||
/**
|
||||
+ * Removes all metadata in the metadata store that originates from the
|
||||
+ * given plugin.
|
||||
+ *
|
||||
|
@ -33,9 +32,10 @@ index 64c0f0a7..6da6abd8 100644
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
+ /**
|
||||
* Creates a unique name for the object receiving metadata by combining
|
||||
* unique data from the subject with a metadataKey.
|
||||
* <p>
|
||||
--
|
||||
2.14.1
|
||||
2.7.4
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From de084b3fedb588ce21b0ea7c3e08965804bb7971 Mon Sep 17 00:00:00 2001
|
||||
From 902e1a01df0798407c4cae98a52b05e83bffd1a7 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaBlend <whizkid3000@hotmail.com>
|
||||
Date: Thu, 8 Sep 2016 08:47:08 -0700
|
||||
Subject: [PATCH] Add source to PlayerExpChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
|
||||
index f37491d7..30882559 100644
|
||||
index f37491d..3088255 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
|
||||
@@ -1,20 +1,42 @@
|
||||
@@ -1,21 +1,43 @@
|
||||
package org.bukkit.event.player;
|
||||
|
||||
+import org.bukkit.entity.Entity; // Paper
|
||||
|
@ -37,7 +37,7 @@ index f37491d7..30882559 100644
|
|||
exp = expAmount;
|
||||
}
|
||||
|
||||
+ /**
|
||||
/**
|
||||
+ * Get the source that provided the experience.
|
||||
+ *
|
||||
+ * @return The source of the experience
|
||||
|
@ -48,9 +48,10 @@ index f37491d7..30882559 100644
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
+ /**
|
||||
* Get the amount of experience the player will receive
|
||||
*
|
||||
* @return The amount of experience
|
||||
--
|
||||
2.14.1
|
||||
2.7.4
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue