Fix Example Mod (Again)
This commit is contained in:
parent
f3f8e342d8
commit
4523935d62
@ -5,7 +5,7 @@
|
|||||||
#include <mods/misc/misc.h>
|
#include <mods/misc/misc.h>
|
||||||
|
|
||||||
// The Actual Mod
|
// The Actual Mod
|
||||||
HOOK(_Z23chat_handle_packet_sendP9MinecraftP10ChatPacket, void, (Minecraft *minecraft, ChatPacket *packet)) {
|
HOOK(chat_handle_packet_send, void, (Minecraft *minecraft, ChatPacket *packet)) {
|
||||||
// Get Message
|
// Get Message
|
||||||
const char *message = packet->message.c_str();
|
const char *message = packet->message.c_str();
|
||||||
if (message[0] == '/') {
|
if (message[0] == '/') {
|
||||||
@ -18,7 +18,7 @@ HOOK(_Z23chat_handle_packet_sendP9MinecraftP10ChatPacket, void, (Minecraft *mine
|
|||||||
gui->addMessage(&out);
|
gui->addMessage(&out);
|
||||||
} else {
|
} else {
|
||||||
// Call Original Method
|
// Call Original Method
|
||||||
ensure__Z23chat_handle_packet_sendP9MinecraftP10ChatPacket();
|
ensure_chat_handle_packet_send();
|
||||||
real__Z23chat_handle_packet_sendP9MinecraftP10ChatPacket(minecraft, packet);
|
real_chat_handle_packet_send(minecraft, packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user