Archiviert
13
0

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.
Dieser Commit ist enthalten in:
MiniDigger 2018-03-10 05:14:47 +01:00 committet von Daniel Ennis
Ursprung 3da0c30cd1
Commit 09692269ca
10 geänderte Dateien mit 140 neuen und 99 gelöschten Zeilen

Datei anzeigen

@ -29,4 +29,5 @@ chickeneer <emcchickeneer@gmail.com>
Minecrell <minecrell@minecrell.net>
Techcable <Techcable@outlook.com>
BillyGalbreath <blake.galbreath@gmail.com>
MiniDigger <admin@minidigger.me>
```

Datei anzeigen

@ -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

Datei anzeigen

@ -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

Datei anzeigen

@ -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

Datei anzeigen

@ -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

Datei anzeigen

@ -1,4 +1,4 @@
From 5764072103b0e1eb4f455bdc1ee93490281abfa6 Mon Sep 17 00:00:00 2001
From 1bd0e17cc58aee667b5a133db0cac4576de6769d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 000000000..1b33390de
index 0000000..1b33390
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,125 @@
@ -137,7 +137,7 @@ index 000000000..1b33390de
+}
diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
new file mode 100644
index 000000000..089154f62
index 0000000..089154f
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
@@ -0,0 +1,131 @@
@ -274,7 +274,7 @@ index 000000000..089154f62
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 000000000..e0ad559b7
index 0000000..e0ad559
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,99 @@
@ -378,7 +378,7 @@ index 000000000..e0ad559b7
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5ab2cf6ee..b5795b6d3 100644
index 5ab2cf6..b5795b6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -422,7 +422,7 @@ index 5ab2cf6ee..b5795b6d3 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 2dca6dbcb..352310960 100644
index 2dca6db..3523109 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -35,6 +35,15 @@ public class Block {
@ -442,7 +442,7 @@ index 2dca6dbcb..352310960 100644
public static int getId(Block block) {
return Block.REGISTRY.a(block); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c4d9344a7..350e0991d 100644
index c4d9344..350e099 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -900,7 +900,7 @@ public class Chunk {
@ -490,7 +490,7 @@ index c4d9344a7..350e0991d 100644
private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index ac478fb27..69ded6aa4 100644
index ac478fb..69ded6a 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -204,7 +204,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -503,7 +503,7 @@ index ac478fb27..69ded6aa4 100644
this.chunkLoader.saveChunk(this.world, chunk, unloaded); // Spigot
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 50ec3adb8..a401dec60 100644
index 50ec3ad..a401dec 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -423,7 +423,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -543,7 +543,7 @@ index 50ec3adb8..a401dec60 100644
// return chunk; // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index e1cb96a88..8f2afcc32 100644
index e1cb96a..8f2afcc 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -24,7 +24,7 @@ import java.io.PrintStream;
@ -596,7 +596,7 @@ index e1cb96a88..8f2afcc32 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 40f06c5bc..4c794a098 100644
index ed39b12..e09ced1 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace;
@ -635,7 +635,7 @@ index 40f06c5bc..4c794a098 100644
public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index ecff5fce3..756590ac0 100644
index ecff5fc..756590a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -706,7 +706,7 @@ index ecff5fce3..756590ac0 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index ce0124020..a60f94608 100644
index ce01240..a60f946 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -175,7 +175,7 @@ public class EntityTracker {
@ -737,7 +737,7 @@ index ce0124020..a60f94608 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c1a8816b4..8d08b536a 100644
index c1a8816..8d08b53 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -48,8 +48,8 @@ import org.bukkit.Bukkit;
@ -884,7 +884,7 @@ index c1a8816b4..8d08b536a 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index eeac34998..e4ed2e991 100644
index eeac349..e4ed2e9 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,5 +1,6 @@
@ -984,7 +984,7 @@ index eeac34998..e4ed2e991 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index cd2d58bfb..da25a8bea 100644
index cd2d58b..da25a8b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -1032,7 +1032,7 @@ index cd2d58bfb..da25a8bea 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index f74b06794..1fc632e0c 100644
index f74b067..1fc632e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,15 +1,21 @@
@ -1062,7 +1062,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 914f2e94a..b3321da59 100644
index 0a0b8a4..e098a7a 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1086,7 +1086,7 @@ index 914f2e94a..b3321da59 100644
public void addWhitelist(GameProfile gameprofile) {
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 74e3f42cd..66a80a776 100644
index 74e3f42..66a80a7 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -1,5 +1,7 @@
@ -1128,7 +1128,7 @@ index 74e3f42cd..66a80a776 100644
return flag;
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 5a5a588e7..d2d4ff6fb 100644
index 5a5a588..d2d4ff6 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
@ -1148,7 +1148,7 @@ index 5a5a588e7..d2d4ff6fb 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 843320ffb..d902e2630 100644
index 843320f..d902e26 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -19,11 +19,11 @@ import com.google.common.collect.Maps;
@ -1254,7 +1254,7 @@ index 843320ffb..d902e2630 100644
public boolean b(AxisAlignedBB axisalignedbb) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d4f25cbf2..e492913a2 100644
index d4f25cb..e492913 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -305,13 +305,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -1388,10 +1388,10 @@ index d4f25cbf2..e492913a2 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 14851a3a5..9042deed6 100644
index 14851a3..9042dee 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1756,12 +1756,31 @@ public final class CraftServer implements Server {
@@ -1756,6 +1756,7 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
@ -1399,10 +1399,10 @@ index 14851a3a5..9042deed6 100644
@Override
public YamlConfiguration getConfig()
{
return org.spigotmc.SpigotConfig.config;
@@ -1763,6 +1764,24 @@ public final class CraftServer implements Server {
}
+ @Override
@Override
+ public YamlConfiguration getBukkitConfig()
+ {
+ return configuration;
@ -1420,12 +1420,13 @@ index 14851a3a5..9042deed6 100644
+ return com.destroystokyo.paper.PaperConfig.config;
+ }
+
@Override
+ @Override
public void restart() {
org.spigotmc.RestartCommand.restart();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 4c8ab2bc9..000000000
index 4c8ab2b..0000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,174 +0,0 @@
@ -1604,7 +1605,7 @@ index 4c8ab2bc9..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 3a95b4465..b5efb9c3f 100644
index 3a95b44..b5efb9c 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -1,6 +1,8 @@
@ -1648,7 +1649,7 @@ index 3a95b4465..b5efb9c3f 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2d5dc2179..916781403 100644
index 2d5dc21..9167814 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -41,7 +41,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@ -1674,7 +1675,7 @@ index 2d5dc2179..916781403 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 23d7ce26f..d50bbd2a6 100644
index 23d7ce2..d50bbd2 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@ -1750,7 +1751,7 @@ index 23d7ce26f..d50bbd2a6 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index c37275f2a..a03f933af 100644
index c37275f..a03f933 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,8 +1,8 @@
@ -1832,7 +1833,7 @@ index c37275f2a..a03f933af 100644
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b7..3d90b3426 100644
index e52ef47..3d90b34 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1844,7 +1845,7 @@ index e52ef47b7..3d90b3426 100644
this.value = value;
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 2bd690fdf..38be7ed71 100644
index 2bd690f..38be7ed 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;
@ -1906,5 +1907,5 @@ index 2bd690fdf..38be7ed71 100644
}
}
--
2.16.1
2.7.4

Datei anzeigen

@ -1,11 +1,11 @@
From 5bfb5e8ee90a3f325ebed6c61703c283e8a9ab9b Mon Sep 17 00:00:00 2001
From 2d386d626a9e65f14718881154a9162ea224cea1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 27 Dec 2016 15:02:42 -0500
Subject: [PATCH] String based Action Bar API
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index a4b0901cf..02940d697 100644
index a4b0901..02940d6 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -1,10 +1,13 @@
@ -62,14 +62,13 @@ index a4b0901cf..02940d697 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 98e9da59a..a9186b77a 100644
index 98e9da5..a9186b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -169,6 +169,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@@ -170,6 +170,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
+ @Override
@Override
+ public void sendActionBar(String message) {
+ if (getHandle().playerConnection == null || message == null || message.isEmpty()) return;
+ getHandle().playerConnection.sendPacket(new PacketPlayOutChat(new ChatComponentText(message), ChatMessageType.GAME_INFO));
@ -81,9 +80,10 @@ index 98e9da59a..a9186b77a 100644
+ sendActionBar(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message));
+ }
+
@Override
+ @Override
public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
packet.header = header;
--
2.16.1
2.7.4

Datei anzeigen

@ -1,4 +1,4 @@
From f300c987bf978cd5a1a6466e4f846a704a692809 Mon Sep 17 00:00:00 2001
From d440f79c051cd725d7964f964782a22cc9426b28 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 9 Jun 2017 19:03:43 +0200
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
@ -20,22 +20,22 @@ Other changes:
configuration
diff --git a/pom.xml b/pom.xml
index 5d9f71b1d..da69bb93f 100644
index 5d9f71b..da69bb9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,12 +53,6 @@
<version>5.0.4</version>
@@ -54,12 +54,6 @@
<scope>compile</scope>
</dependency>
- <dependency>
<dependency>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- <version>2.12.1</version>
- <scope>compile</scope>
- </dependency>
<dependency>
- <dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.21.0.1</version>
@@ -77,6 +71,32 @@
<version>3.0.3</version>
<scope>compile</scope>
@ -90,7 +90,7 @@ index 5d9f71b1d..da69bb93f 100644
<groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
new file mode 100644
index 000000000..685deaa0e
index 0000000..685deaa
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
@@ -0,0 +1,17 @@
@ -113,7 +113,7 @@ index 000000000..685deaa0e
+}
diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java
new file mode 100644
index 000000000..d5bc61490
index 0000000..d5bc614
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalHandler.java
@@ -0,0 +1,60 @@
@ -178,7 +178,7 @@ index 000000000..d5bc61490
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 8f2afcc32..b3f1aa999 100644
index 8f2afcc..b3f1aa9 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -73,7 +73,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -231,7 +231,7 @@ index 8f2afcc32..b3f1aa999 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 908a5d273..e8bddc171 100644
index 908a5d2..e8bddc1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -42,7 +42,6 @@ import org.apache.commons.lang3.Validate;
@ -290,7 +290,7 @@ index 908a5d273..e8bddc171 100644
public boolean a(int i, String s) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ff01bbff5..311c0b86f 100644
index 6c34f85..563b0fb 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -78,8 +78,7 @@ public abstract class PlayerList {
@ -304,7 +304,7 @@ index ff01bbff5..311c0b86f 100644
this.k = new GameProfileBanList(PlayerList.a);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 27c6caddc..539f492e0 100644
index 27c6cad..539f492 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -128,7 +128,6 @@ import io.netty.buffer.ByteBuf;
@ -330,7 +330,7 @@ index 27c6caddc..539f492e0 100644
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ec9508e90..d3d848f8c 100644
index ec9508e..d3d848f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -14,7 +14,7 @@ import java.util.logging.Logger;
@ -372,7 +372,7 @@ index ec9508e90..d3d848f8c 100644
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
deleted file mode 100644
index 26a2fb894..000000000
index 26a2fb8..0000000
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ /dev/null
@@ -1,74 +0,0 @@
@ -451,7 +451,7 @@ index 26a2fb894..000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index 33e8ea02c..1e3aae3b8 100644
index 33e8ea0..1e3aae3 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -8,17 +8,27 @@ import java.util.logging.Level;
@ -530,7 +530,7 @@ index 33e8ea02c..1e3aae3b8 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 984df4083..bbb5a84f3 100644
index 984df40..bbb5a84 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -20,7 +20,7 @@ public class ServerShutdownThread extends Thread {
@ -544,7 +544,7 @@ index 984df4083..bbb5a84f3 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
deleted file mode 100644
index b64097113..000000000
index b640971..0000000
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ /dev/null
@@ -1,54 +0,0 @@
@ -603,7 +603,7 @@ index b64097113..000000000
- }
-}
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 5cee8f00e..08b6bb7f9 100644
index 5cee8f0..08b6bb7 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -1,12 +1,11 @@
@ -633,5 +633,5 @@ index 5cee8f00e..08b6bb7f9 100644
<AppenderRef ref="TerminalConsole" level="info"/>
</Root>
--
2.16.1
2.7.4

Datei anzeigen

@ -1,26 +1,26 @@
From fa8a701f15d3ce39f3c7af65000fa2ca2b9a6475 Mon Sep 17 00:00:00 2001
From 24feb5237d822d68fabe0bbf8ab1ceda0169eab0 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:33:35 +0200
Subject: [PATCH] Include Log4J2 SLF4J implementation
diff --git a/pom.xml b/pom.xml
index 28976dae8..ffa9f5a97 100644
index 28976da..ffa9f5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,6 +98,12 @@
</dependency>
@@ -100,6 +100,12 @@
<!-- Paper - Add additional Log4J dependencies -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>2.8.1</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-iostreams</artifactId>
<version>2.8.1</version>
</dependency>
--
2.16.1
2.7.4

Datei anzeigen

@ -0,0 +1,38 @@
From fa93fba35b7fa5ee49268eac594a77e0f873ea56 Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me>
Date: Sat, 10 Mar 2018 00:50:24 +0100
Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 61cc1d4..038f874 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -232,6 +232,11 @@ public class PaperWorldConfig {
disableChestCatDetection = getBoolean("game-mechanics.disable-chest-cat-detection", false);
}
+ public boolean disablePlayerCrits;
+ private void disablePlayerCrits() {
+ disablePlayerCrits = getBoolean("game-mechanics.disable-player-crits", false);
+ }
+
public boolean allChunksAreSlimeChunks;
private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 3472370..4b82e43 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -978,7 +978,7 @@ public abstract class EntityHuman extends EntityLiving {
}
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.m_() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving;
-
+ flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting();
if (flag2) {
f *= 1.5F;
--
2.7.4