itsshamed / mcctdw Goto Github PK
View Code? Open in Web Editor NEWA bridge plugin between your Minecraft chat and Discord using webhooks
License: GNU General Public License v3.0
A bridge plugin between your Minecraft chat and Discord using webhooks
License: GNU General Public License v3.0
The plugin sends the json it's going to send to discord to STDOUT. This was probably done for debugging, and should be removed as it clutters up the server console. Below is the server console output:
[20:26:05 INFO]: TheKrafter2217 lost connection: Disconnected
[20:26:05 INFO]: [MCCTDW] [STDOUT] {
"tts": false,
"embeds": [
{
"color": 16733525,
"author": {
"name": "TheKrafter2217 left the game.",
"icon_url": "https://minotar.net/helm/3b27ca8c-9f8e-4254-a7c3-a1031f085456/100.png"
}
}
]
}
[20:26:05 WARN]: Nag author(s): '[ItsShamed]' of 'MinecraftChatToDiscordWebhook' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
Every time a player gets an advancement, the an error is sometimes shown in the log, and the advancement message is not sent to the webhook:
[16:47:05 ERROR]: Could not pass event PlayerAdvancementDoneEvent to MinecraftChatToDiscordWebhook v1.1
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsString()" because the return value of "com.google.gson.JsonObject.get(String)" is null
at me.Shamed.MCCTDW.utils.gson.LocaleProvider.translateLocale(LocaleProvider.java:23) ~[MCCTDW.jar:?]
at me.Shamed.MCCTDW.webhook.components.formatted.AdvancementMessage.<init>(AdvancementMessage.java:19) ~[MCCTDW.jar:?]
at me.Shamed.MCCTDW.listeners.AdvancementListener.onPlayerAdvancement(AdvancementListener.java:23) ~[MCCTDW.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor16.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:git-Paper-550]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.19.4.jar:git-Paper-550]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.19.4.jar:git-Paper-550]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.PlayerAdvancements.award(PlayerAdvancements.java:246) ~[?:?]
at net.minecraft.advancements.CriterionTrigger$Listener.run(CriterionTrigger.java:35) ~[?:?]
at net.minecraft.advancements.critereon.SimpleCriterionTrigger.trigger(SimpleCriterionTrigger.java:73) ~[?:?]
at net.minecraft.advancements.critereon.InventoryChangeTrigger.lambda$trigger$0(InventoryChangeTrigger.java:57) ~[?:?]
at net.minecraft.advancements.critereon.InventoryChangeTrigger.trigger(InventoryChangeTrigger.java:53) ~[?:?]
at net.minecraft.server.level.ServerPlayer$2.slotChanged(ServerPlayer.java:347) ~[?:?]
at net.minecraft.world.inventory.AbstractContainerMenu.triggerSlotListeners(AbstractContainerMenu.java:306) ~[?:?]
at net.minecraft.world.inventory.AbstractContainerMenu.broadcastChanges(AbstractContainerMenu.java:243) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleSetCreativeModeSlot(ServerGamePacketListenerImpl.java:3404) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket.handle(ServerboundSetCreativeModeSlotPacket.java:18) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket.handle(ServerboundSetCreativeModeSlotPacket.java:12) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1342) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1319) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1312) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1290) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1178) ~[paper-1.19.4.jar:git-Paper-550]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.