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:
MiniDigger | Martin
2018-03-10 05:14:47 +01:00
parent b36c43bc6b
commit 12012ab589
10 changed files with 114 additions and 75 deletions

View File

@@ -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
@@ -0,0 +0,0 @@ public abstract class MetadataStoreBase<T> {
}
}
+ /**
/**
+ * Removes all metadata in the metadata store that originates from the
+ * given plugin.
+ *
@@ -33,7 +32,8 @@ index 64c0f0a7..6da6abd8 100644
+ }
+ }
+
/**
+ /**
* Creates a unique name for the object receiving metadata by combining
* unique data from the subject with a metadataKey.
* <p>
--

View File

@@ -5,14 +5,13 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ 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,7 +83,8 @@ 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
--

View File

@@ -5,7 +5,7 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
@@ -0,0 +0,0 @@
@@ -37,7 +37,7 @@ index f37491d7..30882559 100644
exp = expAmount;
}
+ /**
/**
+ * Get the source that provided the experience.
+ *
+ * @return The source of the experience
@@ -48,7 +48,8 @@ index f37491d7..30882559 100644
+ }
+ // Paper end
+
/**
+ /**
* Get the amount of experience the player will receive
*
* @return The amount of experience
--

View File

@@ -5,14 +5,13 @@ Subject: [PATCH] add Trove and FastUtil to Bukkit
diff --git a/pom.xml b/pom.xml
index 360d2f08..c6bdf44e 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/pom.xml
+++ b/pom.xml
@@ -0,0 +0,0 @@
</repositories>
<dependencies>
+ <dependency>
<dependency>
+ <groupId>net.sf.trove4j</groupId>
+ <artifactId>trove4j</artifactId>
+ <version>3.0.3</version>
@@ -25,7 +24,8 @@ 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>
--