geforkt von Mirrors/Paper
Fix new lines break URL matching
Dieser Commit ist enthalten in:
Ursprung
dedbed0faf
Commit
5b756ab152
@ -1,11 +1,11 @@
|
||||
From 90653e58b284b1b1f0304d409faf40c6c8039bd8 Mon Sep 17 00:00:00 2001
|
||||
From e36d608f7f0a8fc2ea06b381311a394f8d6ed123 Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <purggames@gmail.com>
|
||||
Date: Sun, 1 Dec 2013 10:33:55 +0000
|
||||
Subject: [PATCH] Fix links in chat
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
index cc8e715..22d1346 100644
|
||||
index cc8e715..5607df1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
@@ -3,11 +3,15 @@ package org.bukkit.craftbukkit.util;
|
||||
@ -48,7 +48,14 @@ index cc8e715..22d1346 100644
|
||||
if (builder.length() > 0) {
|
||||
appendNewComponent();
|
||||
}
|
||||
@@ -78,6 +88,11 @@ public final class CraftChatMessage {
|
||||
@@ -73,11 +83,18 @@ public final class CraftChatMessage {
|
||||
}
|
||||
i++;
|
||||
} else if (currentChar == '\n') {
|
||||
+ checkUrl(matcher, message, i);
|
||||
+ lastWord = i + 1;
|
||||
if (builder.length() > 0) {
|
||||
appendNewComponent();
|
||||
}
|
||||
currentChatComponent = null;
|
||||
} else {
|
||||
@ -60,7 +67,7 @@ index cc8e715..22d1346 100644
|
||||
builder.append(currentChar);
|
||||
}
|
||||
}
|
||||
@@ -89,6 +104,31 @@ public final class CraftChatMessage {
|
||||
@@ -89,6 +106,31 @@ public final class CraftChatMessage {
|
||||
output = list.toArray(new IChatBaseComponent[0]);
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren