Skip to content

Package net.minecraft.client.multiplayer.chat

Part 1/1


ChatListener

  • Full name: net.minecraft.client.multiplayer.chat.ChatListener
  • Package: net.minecraft.client.multiplayer.chat
  • Source: clientOnlynet/minecraft/client/multiplayer/chat/ChatListener.java
  • Type: class
  • Modifiers: public

net.minecraft.client.multiplayer.chat.ChatListener#acceptNextDelayedMessage()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:60
  • Modifiers: public
  • Return: void

คืออะไร

รับค่า Next Delayed Message

ทำงานยังไง

เรียกต่อ: remove(), accept().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatListener instance = ...;
instance.acceptNextDelayedMessage();

net.minecraft.client.multiplayer.chat.ChatListener#ChatListener(Minecraft)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ChatListener ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: minecraft.

Parameters

  • Minecraft minecraft

ตัวอย่างใช้งาน

Minecraft minecraft = ...;
ChatListener instance = new ChatListener(minecraft);

net.minecraft.client.multiplayer.chat.ChatListener#clearQueue()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:68
  • Modifiers: public
  • Return: void

คืออะไร

ล้าง Queue

ทำงานยังไง

เรียกต่อ: forEach(), clear().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatListener instance = ...;
instance.clearQueue();

net.minecraft.client.multiplayer.chat.ChatListener#handleChatMessageError(UUID,Bound)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:105
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Chat Message Error

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: previousMessageTime. เรียกต่อ: handleMessage(), isBlocked(), decorate(), getChat(), addMessage(), chatError(), getMillis(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • UUID uUID
  • Bound bound

ตัวอย่างใช้งาน

ChatListener instance = ...;
UUID uUID = ...;
Bound bound = ...;
instance.handleChatMessageError(uUID, bound);

net.minecraft.client.multiplayer.chat.ChatListener#handleDisguisedChatMessage(Component,Bound)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:118
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Disguised Chat Message

ทำงานยังไง

แก้ state: previousMessageTime. เรียกต่อ: now(), handleMessage(), decorate(), getChat(), addMessage(), narrateChatMessage(), logSystemMessage(), getMillis(). คืนค่า: true.

Parameters

  • Component component
  • Bound bound

ตัวอย่างใช้งาน

ChatListener instance = ...;
Component component = ...;
Bound bound = ...;
instance.handleDisguisedChatMessage(component, bound);

net.minecraft.client.multiplayer.chat.ChatListener#handlePlayerChatMessage(PlayerChatMessage,GameProfile,Bound)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:89
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ Player Chat Message

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: onlyShowSecureChat(), get(), removeUnsignedContent(), decorate(), decoratedContent(), now(), handleMessage(), signature(). คืนค่า: bl2.

Parameters

  • PlayerChatMessage playerChatMessage
  • GameProfile gameProfile
  • Bound bound

ตัวอย่างใช้งาน

ChatListener instance = ...;
PlayerChatMessage playerChatMessage = ...;
GameProfile gameProfile = ...;
Bound bound = ...;
instance.handlePlayerChatMessage(playerChatMessage, gameProfile, bound);

net.minecraft.client.multiplayer.chat.ChatListener#handleSystemMessage(Component,boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:179
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ System Message

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hideMatchedNames(), get(), isBlocked(), guessChatUUID(), setOverlayMessage(), getChat(), addMessage(), logSystemMessage().

Parameters

  • Component component
  • boolean bl

ตัวอย่างใช้งาน

ChatListener instance = ...;
Component component = ...;
instance.handleSystemMessage(component, true);

net.minecraft.client.multiplayer.chat.ChatListener#queueSize()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:64
  • Modifiers: public
  • Return: long

คืออะไร

ดำเนินการ queueSize ตาม implementation ของ ChatListener

ทำงานยังไง

เรียกต่อ: size(). คืนค่า: this.delayedMessageQueue.size().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatListener instance = ...;
long result = instance.queueSize();

net.minecraft.client.multiplayer.chat.ChatListener#removeFromDelayedMessageQueue(MessageSignature)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:73
  • Modifiers: public
  • Return: boolean

คืออะไร

ลบ From Delayed Message Queue

ทำงานยังไง

เรียกต่อ: removeIf(), equals(), signature(). คืนค่า: this.delayedMessageQueue.removeIf(message -> messageSignature.equals(message.signature())).

Parameters

  • MessageSignature messageSignature

ตัวอย่างใช้งาน

ChatListener instance = ...;
MessageSignature messageSignature = ...;
boolean result = instance.removeFromDelayedMessageQueue(messageSignature);

net.minecraft.client.multiplayer.chat.ChatListener#setMessageDelay(double)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:50
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Message Delay

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: messageDelay. เรียกต่อ: forEach(), clear().

Parameters

  • double d

ตัวอย่างใช้งาน

ChatListener instance = ...;
instance.setMessageDelay(0.0D);

net.minecraft.client.multiplayer.chat.ChatListener#tick()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatListener.java:38
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getMillis(), poll(), accept().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatListener instance = ...;
instance.tick();

ChatLog

  • Full name: net.minecraft.client.multiplayer.chat.ChatLog
  • Package: net.minecraft.client.multiplayer.chat
  • Source: clientOnlynet/minecraft/client/multiplayer/chat/ChatLog.java
  • Type: class
  • Modifiers: public

net.minecraft.client.multiplayer.chat.ChatLog#ChatLog(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatLog.java:29
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ChatLog ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: buffer.

Parameters

  • int i

ตัวอย่างใช้งาน

ChatLog instance = new ChatLog(0);

net.minecraft.client.multiplayer.chat.ChatLog#codec(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatLog.java:16
  • Modifiers: public static
  • Return: Codec<ChatLog>

คืออะไร

ดำเนินการ codec ตาม implementation ของ ChatLog

ทำงานยังไง

เรียกต่อ: list(), comapFlatMap(), size(), error(), success(). สร้างออบเจ็กต์: ChatLog. คืนค่า: Codec.list(LoggedChatEvent.CODEC) .comapFlatMap( list -> { int j = list.size().

Parameters

  • int i

ตัวอย่างใช้งาน

Codec<ChatLog> result = ChatLog.codec(0);

net.minecraft.client.multiplayer.chat.ChatLog#end()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatLog.java:65
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ end ตาม implementation ของ ChatLog

ทำงานยังไง

คืนค่า: this.nextId - 1.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatLog instance = ...;
int result = instance.end();

net.minecraft.client.multiplayer.chat.ChatLog#lookup(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatLog.java:52
  • Modifiers: public
  • Return: LoggedChatEvent

คืออะไร

ดำเนินการ lookup ตาม implementation ของ ChatLog

ทำงานยังไง

เรียกต่อ: start(), end(), index(). คืนค่า: i >= this.start() && i <= this.end() ? this.buffer[this.index(i)] : null.

Parameters

  • int i

ตัวอย่างใช้งาน

ChatLog instance = ...;
LoggedChatEvent result = instance.lookup(0);

net.minecraft.client.multiplayer.chat.ChatLog#push(LoggedChatEvent)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatLog.java:48
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ push ตาม implementation ของ ChatLog

ทำงานยังไง

แก้ state: nextId. เรียกต่อ: index().

Parameters

  • LoggedChatEvent loggedChatEvent

ตัวอย่างใช้งาน

ChatLog instance = ...;
LoggedChatEvent loggedChatEvent = ...;
instance.push(loggedChatEvent);

net.minecraft.client.multiplayer.chat.ChatLog#start()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatLog.java:61
  • Modifiers: public
  • Return: int

คืออะไร

เริ่ม start

ทำงานยังไง

เรียกต่อ: max(). คืนค่า: Math.max(this.nextId - this.buffer.length, 0).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatLog instance = ...;
int result = instance.start();

ChatTrustLevel

  • Full name: net.minecraft.client.multiplayer.chat.ChatTrustLevel
  • Package: net.minecraft.client.multiplayer.chat
  • Source: clientOnlynet/minecraft/client/multiplayer/chat/ChatTrustLevel.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.client.multiplayer.chat.ChatTrustLevel#createTag(PlayerChatMessage)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatTrustLevel.java:57
  • Modifiers: public
  • Return: GuiMessageTag

คืออะไร

สร้าง Tag

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: chatModified(), signedContent(), chatNotSecure(). คืนค่า: switch (this) { case MODIFIED -> GuiMessageTag.chatModified(playerChatMessage.signedContent()).

Parameters

  • PlayerChatMessage playerChatMessage

ตัวอย่างใช้งาน

ChatTrustLevel instance = ...;
PlayerChatMessage playerChatMessage = ...;
GuiMessageTag result = instance.createTag(playerChatMessage);

net.minecraft.client.multiplayer.chat.ChatTrustLevel#evaluate(PlayerChatMessage,Component,Instant)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatTrustLevel.java:28
  • Modifiers: public static
  • Return: ChatTrustLevel

คืออะไร

ดำเนินการ evaluate ตาม implementation ของ ChatTrustLevel

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasSignature(), hasExpiredClient(), isModified(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • PlayerChatMessage playerChatMessage
  • Component component
  • Instant instant

ตัวอย่างใช้งาน

PlayerChatMessage playerChatMessage = ...;
Component component = ...;
Instant instant = ...;
ChatTrustLevel result = ChatTrustLevel.evaluate(playerChatMessage, component, instant);

net.minecraft.client.multiplayer.chat.ChatTrustLevel#getSerializedName()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatTrustLevel.java:66
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.serializedName.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatTrustLevel instance = ...;
String result = instance.getSerializedName();

net.minecraft.client.multiplayer.chat.ChatTrustLevel#isNotSecure()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/ChatTrustLevel.java:53
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Not Secure

ทำงานยังไง

คืนค่า: this == NOT_SECURE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChatTrustLevel instance = ...;
boolean result = instance.isNotSecure();

LoggedChatEvent

  • Full name: net.minecraft.client.multiplayer.chat.LoggedChatEvent
  • Package: net.minecraft.client.multiplayer.chat
  • Source: clientOnlynet/minecraft/client/multiplayer/chat/LoggedChatEvent.java
  • Type: interface
  • Modifiers: public

net.minecraft.client.multiplayer.chat.LoggedChatEvent#type()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/LoggedChatEvent.java:14
  • Modifiers: ``
  • Return: LoggedChatEvent.Type

คืออะไร

ดำเนินการ type ตาม implementation ของ LoggedChatEvent

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LoggedChatEvent instance = ...;
LoggedChatEvent.Type result = instance.type();

LoggedChatMessage

  • Full name: net.minecraft.client.multiplayer.chat.LoggedChatMessage
  • Package: net.minecraft.client.multiplayer.chat
  • Source: clientOnlynet/minecraft/client/multiplayer/chat/LoggedChatMessage.java
  • Type: interface
  • Modifiers: public
  • Implements: LoggedChatEvent

net.minecraft.client.multiplayer.chat.LoggedChatMessage#canReport(UUID)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/LoggedChatMessage.java:36
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Report

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • UUID uUID

ตัวอย่างใช้งาน

LoggedChatMessage instance = ...;
UUID uUID = ...;
boolean result = instance.canReport(uUID);

net.minecraft.client.multiplayer.chat.LoggedChatMessage#player(GameProfile,PlayerChatMessage,ChatTrustLevel)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/LoggedChatMessage.java:22
  • Modifiers: static
  • Return: LoggedChatMessage.Player

คืออะไร

ดำเนินการ player ตาม implementation ของ LoggedChatMessage

ทำงานยังไง

เรียกต่อ: Player(). สร้างออบเจ็กต์: LoggedChatMessage.Player. คืนค่า: new LoggedChatMessage.Player(gameProfile, playerChatMessage, chatTrustLevel).

Parameters

  • GameProfile gameProfile
  • PlayerChatMessage playerChatMessage
  • ChatTrustLevel chatTrustLevel

ตัวอย่างใช้งาน

GameProfile gameProfile = ...;
PlayerChatMessage playerChatMessage = ...;
ChatTrustLevel chatTrustLevel = ...;
LoggedChatMessage.Player result = LoggedChatMessage.player(gameProfile, playerChatMessage, chatTrustLevel);

net.minecraft.client.multiplayer.chat.LoggedChatMessage#system(Component,Instant)

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/LoggedChatMessage.java:26
  • Modifiers: static
  • Return: LoggedChatMessage.System

คืออะไร

ดำเนินการ system ตาม implementation ของ LoggedChatMessage

ทำงานยังไง

เรียกต่อ: System(). สร้างออบเจ็กต์: LoggedChatMessage.System. คืนค่า: new LoggedChatMessage.System(component, instant).

Parameters

  • Component component
  • Instant instant

ตัวอย่างใช้งาน

Component component = ...;
Instant instant = ...;
LoggedChatMessage.System result = LoggedChatMessage.system(component, instant);

net.minecraft.client.multiplayer.chat.LoggedChatMessage#toContentComponent()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/LoggedChatMessage.java:30
  • Modifiers: ``
  • Return: Component

คืออะไร

ดำเนินการ toContentComponent ตาม implementation ของ LoggedChatMessage

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LoggedChatMessage instance = ...;
Component result = instance.toContentComponent();

net.minecraft.client.multiplayer.chat.LoggedChatMessage#toNarrationComponent()

  • Origin: clientOnly
  • Source: net/minecraft/client/multiplayer/chat/LoggedChatMessage.java:32
  • Modifiers: default
  • Return: Component

คืออะไร

ดำเนินการ toNarrationComponent ตาม implementation ของ LoggedChatMessage

ทำงานยังไง

เรียกต่อ: toContentComponent(). คืนค่า: this.toContentComponent().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LoggedChatMessage instance = ...;
Component result = instance.toNarrationComponent();