mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-18 20:33:28 +02:00
Prevent chat event if client is not logged in server
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module.exports = function(socket) {
|
||||
|
||||
socket.on('chat', function(data) {
|
||||
if (socket.mcbot) {
|
||||
if (socket.mcbot && socket.mcbot.entity) {
|
||||
socket.mcbot.chat(data.message);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user