Commit 90695d212815f4e5e518c4a41b21825093398174
1 parent
29ceeb58
LiteLoader 1.6.2 - update for minor issue where chat filters manipulating the ch…
…at would not be passed downstream
Showing
2 changed files
with
15 additions
and
5 deletions
java/com/mumfrey/liteloader/core/LiteLoader.java
@@ -63,14 +63,14 @@ import com.mumfrey.liteloader.util.PrivateFields; | @@ -63,14 +63,14 @@ import com.mumfrey.liteloader.util.PrivateFields; | ||
63 | * lightweight mods | 63 | * lightweight mods |
64 | * | 64 | * |
65 | * @author Adam Mummery-Smith | 65 | * @author Adam Mummery-Smith |
66 | - * @version 1.6.2 | 66 | + * @version 1.6.2_01 |
67 | */ | 67 | */ |
68 | public final class LiteLoader implements FilenameFilter, IPlayerUsage | 68 | public final class LiteLoader implements FilenameFilter, IPlayerUsage |
69 | { | 69 | { |
70 | /** | 70 | /** |
71 | * Liteloader version | 71 | * Liteloader version |
72 | */ | 72 | */ |
73 | - private static final LiteLoaderVersion VERSION = LiteLoaderVersion.MC_1_6_2_R0; | 73 | + private static final LiteLoaderVersion VERSION = LiteLoaderVersion.MC_1_6_2_R1; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Maximum recursion depth for mod discovery | 76 | * Maximum recursion depth for mod discovery |
@@ -1899,8 +1899,17 @@ public final class LiteLoader implements FilenameFilter, IPlayerUsage | @@ -1899,8 +1899,17 @@ public final class LiteLoader implements FilenameFilter, IPlayerUsage | ||
1899 | // Chat filters get a stab at the chat first, if any filter returns | 1899 | // Chat filters get a stab at the chat first, if any filter returns |
1900 | // false the chat is discarded | 1900 | // false the chat is discarded |
1901 | for (ChatFilter chatFilter : this.chatFilters) | 1901 | for (ChatFilter chatFilter : this.chatFilters) |
1902 | - if (!chatFilter.onChat(chatPacket, chat, message)) | 1902 | + { |
1903 | + if (chatFilter.onChat(chatPacket, chat, message)) | ||
1904 | + { | ||
1905 | + chat = ChatMessageComponent.func_111078_c(chatPacket.message); | ||
1906 | + message = chat.func_111068_a(true); | ||
1907 | + } | ||
1908 | + else | ||
1909 | + { | ||
1903 | return false; | 1910 | return false; |
1911 | + } | ||
1912 | + } | ||
1904 | 1913 | ||
1905 | // Chat listeners get the chat if no filter removed it | 1914 | // Chat listeners get the chat if no filter removed it |
1906 | for (ChatListener chatListener : this.chatListeners) | 1915 | for (ChatListener chatListener : this.chatListeners) |
java/com/mumfrey/liteloader/core/LiteLoaderVersion.java
@@ -7,7 +7,7 @@ import java.util.Set; | @@ -7,7 +7,7 @@ import java.util.Set; | ||
7 | * LiteLoader version table | 7 | * LiteLoader version table |
8 | * | 8 | * |
9 | * @author Adam Mummery-Smith | 9 | * @author Adam Mummery-Smith |
10 | - * @version 1.6.2 | 10 | + * @version 1.6.2_01 |
11 | */ | 11 | */ |
12 | public enum LiteLoaderVersion | 12 | public enum LiteLoaderVersion |
13 | { | 13 | { |
@@ -15,7 +15,8 @@ public enum LiteLoaderVersion | @@ -15,7 +15,8 @@ public enum LiteLoaderVersion | ||
15 | MC_1_5_2_R1(9, "1.5.2", "1.5.2", "1.5.2"), | 15 | MC_1_5_2_R1(9, "1.5.2", "1.5.2", "1.5.2"), |
16 | MC_1_5_2_R2(10, "1.5.2", "1.5.2", "1.5.2"), | 16 | MC_1_5_2_R2(10, "1.5.2", "1.5.2", "1.5.2"), |
17 | MC_1_6_1_R0(11, "1.6.1", "1.6.1", "1.6.1", "1.6.r1"), | 17 | MC_1_6_1_R0(11, "1.6.1", "1.6.1", "1.6.1", "1.6.r1"), |
18 | - MC_1_6_2_R0(12, "1.6.2", "1.6.2", "1.6.2", "1.6.r2"); | 18 | + MC_1_6_2_R0(12, "1.6.2", "1.6.2", "1.6.2", "1.6.r2"), |
19 | + MC_1_6_2_R1(13, "1.6.2", "1.6.2", "1.6.2", "1.6.r2"); | ||
19 | 20 | ||
20 | private int revision; | 21 | private int revision; |
21 | 22 |