spigot/CraftBukkit-Patches/0079-Descriptive-kick-reasons-instead-of-Nope.patch

45 lines
2.4 KiB
Diff
Raw Normal View History

2017-04-30 09:32:32 +10:00
From 795555b82081a9161364822439155299b6f95f44 Mon Sep 17 00:00:00 2001
2014-04-12 14:18:37 +10:00
From: drXor <mcyoungsota@gmail.com>
Date: Sat, 15 Mar 2014 01:30:05 -0400
Subject: [PATCH] Descriptive kick reasons instead of Nope!
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
2017-04-22 15:54:44 +10:00
index d486ddd0..9bd9dc28 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
2016-12-21 07:00:00 +11:00
@@ -271,7 +271,7 @@ public abstract class Entity implements ICommandListener {
if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) {
2014-04-12 14:18:37 +10:00
if (this instanceof EntityPlayer) {
this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw");
2014-04-12 14:18:37 +10:00
- ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Nope");
+ ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite yaw (Hacking?)"); //Spigot "Nope" -> Descriptive reason
}
f = 0;
}
2016-12-21 07:00:00 +11:00
@@ -284,7 +284,7 @@ public abstract class Entity implements ICommandListener {
if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) {
2014-04-12 14:18:37 +10:00
if (this instanceof EntityPlayer) {
this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch");
2014-04-12 14:18:37 +10:00
- ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Nope");
+ ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite pitch (Hacking?)"); //Spigot "Nope" -> Descriptive reason
}
f1 = 0;
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
2017-04-22 15:54:44 +10:00
index fb302be8..9f0d6542 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2017-04-22 15:54:44 +10:00
@@ -1110,7 +1110,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
2015-05-09 21:23:26 +01:00
this.player.resetIdleTimer();
2014-04-12 14:18:37 +10:00
} else {
2016-06-09 11:43:56 +10:00
PlayerConnection.LOGGER.warn("{} tried to set an invalid carried item", new Object[] { this.player.getName()});
2014-04-12 14:18:37 +10:00
- this.disconnect("Nope!"); // CraftBukkit
+ this.disconnect("Invalid hotbar selection (Hacking?)"); // CraftBukkit //Spigot "Nope" -> Descriptive reason
}
}
--
2017-04-22 15:54:44 +10:00
2.11.0
2014-04-12 14:18:37 +10:00