forked from Arasple/TrChat
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a481cc8
commit ded73b5
Showing
7 changed files
with
28 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 9 additions & 5 deletions
14
project/module-nms/src/main/kotlin/me/arasple/mc/trchat/api/nms/NMSImpl12100.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
package me.arasple.mc.trchat.api.nms | ||
|
||
import net.minecraft.network.chat.IChatBaseComponent | ||
import org.bukkit.craftbukkit.v1_20_R3.util.CraftChatMessage | ||
import org.bukkit.entity.Player | ||
import org.bukkit.inventory.ItemStack | ||
import taboolib.common.platform.function.adaptPlayer | ||
import taboolib.module.chat.ComponentText | ||
import taboolib.module.nms.MinecraftLanguage | ||
import taboolib.module.nms.getLanguageKey | ||
import taboolib.platform.util.hoverItem | ||
import java.util.* | ||
|
||
class NMSImpl12100 : NMS() { | ||
|
||
override fun craftChatMessageFromComponent(component: ComponentText): Any { | ||
TODO("Not yet implemented") | ||
return CraftChatMessage.fromJSON(component.toRawMessage()) | ||
} | ||
|
||
override fun rawMessageFromCraftChatMessage(component: Any): String { | ||
TODO("Not yet implemented") | ||
return CraftChatMessage.toJSON(component as IChatBaseComponent) | ||
} | ||
|
||
override fun sendMessage(receiver: Player, component: ComponentText, sender: UUID?, usePacket: Boolean) { | ||
component.sendTo(adaptPlayer(receiver)) | ||
} | ||
|
||
override fun hoverItem(component: ComponentText, itemStack: ItemStack): ComponentText { | ||
TODO("Not yet implemented") | ||
return component.hoverItem(itemStack) | ||
} | ||
|
||
override fun optimizeNBT(itemStack: ItemStack, nbtWhitelist: Array<String>): ItemStack { | ||
TODO("Not yet implemented") | ||
return itemStack | ||
} | ||
|
||
override fun getLocaleKey(itemStack: ItemStack): MinecraftLanguage.LanguageKey { | ||
TODO("Not yet implemented") | ||
return itemStack.getLanguageKey() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters