Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
Normalize spaces on when reading a chat packet
Dieser Commit ist enthalten in:
Ursprung
eb9e4c0460
Commit
3b52578a51
@ -0,0 +1,35 @@
|
||||
From a4e6058ce985acf7afe2f8c02a2dfa1264cdf1d5 Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||
Date: Wed, 26 Feb 2014 14:45:22 +0000
|
||||
Subject: [PATCH] Normalize spaces on when reading a chat packet
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayInChat.java b/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
||||
index d419f0f..b26c290 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
||||
@@ -17,7 +17,7 @@ public class PacketPlayInChat extends Packet {
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
|
||||
- this.message = packetdataserializer.c(100);
|
||||
+ this.message = org.apache.commons.lang.StringUtils.normalizeSpace( packetdataserializer.c( 100 ) ); // Spigot
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index f84df92..b68cd97 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -791,7 +791,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
||||
this.player.w();
|
||||
String s = packetplayinchat.c();
|
||||
|
||||
- s = StringUtils.normalizeSpace(s);
|
||||
+ // s = StringUtils.normalizeSpace(s); Spigot - Moved to PacketPlayInChat
|
||||
|
||||
for (int i = 0; i < s.length(); ++i) {
|
||||
if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) {
|
||||
--
|
||||
1.8.5.2.msysgit.0
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren