mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Loosen up ServerChatEvent to support IChatComponent Closes #1893
This commit is contained in:
1 parent
8d7b999506
commit
df5e594e95
2 files changed
+22
-5
No files matched your search
@@ -130,17 +130,19 @@
|
||||
{
|
||||
this.func_147359_a(new S2FPacketSetSlot(this.field_147369_b.field_71070_bA.field_75152_c, slot.field_75222_d, this.field_147369_b.field_71071_by.func_70448_g()));
|
||||
}
|
||||
@@ -764,7 +792,9 @@
|
||||
@@ -764,8 +792,10 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- ChatComponentTranslation chatcomponenttranslation1 = new ChatComponentTranslation("chat.type.text", new Object[] {this.field_147369_b.func_145748_c_(), s});
|
||||
- this.field_147367_d.func_71203_ab().func_148544_a(chatcomponenttranslation1, false);
|
||||
+ ChatComponentTranslation chatcomponenttranslation1 = new ChatComponentTranslation("chat.type.text", this.field_147369_b.func_145748_c_(), ForgeHooks.newChatWithLinks(s));
|
||||
+ chatcomponenttranslation1 = ForgeHooks.onServerChatEvent(this, s, chatcomponenttranslation1);
|
||||
+ if (chatcomponenttranslation1 == null) return;
|
||||
this.field_147367_d.func_71203_ab().func_148544_a(chatcomponenttranslation1, false);
|
||||
+ IChatComponent chat = ForgeHooks.onServerChatEvent(this, s, chatcomponenttranslation1);
|
||||
+ if (chat == null) return;
|
||||
+ this.field_147367_d.func_71203_ab().func_148544_a(chat, false);
|
||||
}
|
||||
|
||||
this.field_147374_l += 20;
|
||||
@@ -907,7 +937,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user