Giter Club home page Giter Club logo

magibridge's Introduction

Hey there 👋 I'm Eufranio Lima

I am a professional Mobile Developer, graduated at Federal University of Sergipe, Brazil, since 2018-2023.
I enjoy developing web and mobile applications, mainly using Flutter, and Minecraft plugins/mods using Java.

If you want to know more about me and my work, please visit my developer page!

Eufranio's github stats

magibridge's People

Contributors

ale32bit avatar brycey92 avatar cdagaming avatar clienthax avatar dan-shields avatar daniel-widrick avatar eufranio avatar lemadec avatar lurr avatar phase avatar romvoid95 avatar vorburger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magibridge's Issues

LuckPerms, #console, & webhooks

Some features I'd love to see:

  • 1. Have the IGN LuckPerms ranks display in front of name in Discord chat. (ex. "[Newbie] fcpwiz: Hey guys!")

  • 2. Have a #console channel on Discord that displays the console output and that can be interacted with.

  • 3. Have option to use webhooks for players so IGN player skin and name are viewable from Discord.

Thanks!

Feature Request: Command Channel

It would be really nice to be able to assign a Discord channel for commands. That way the staff or global channel doesn't get filled with them.

Suggestion: Use helms instead of avatar in webhooks

I see crafatar is being used to get the player heads that are used in the webhook. I think it would be better if helms were used instead, or maybe even enable a config option to customize the link to get the image from.

The implementation of this should be really easy, the only difference would be the added "&overlay=yes" in the end of the craftar link:
It would be:
https://crafatar.com/avatars/'+ player +'?default=MHF_Alex&overlay=yes

Another thing that would be great to see is an option to set the bot avatar from an URL.
See: https://github.com/Scarsz/DiscordSRV/blob/master/src/main/java/github/scarsz/discordsrv/commands/CommandSetPicture.java

[1.10.2-1.12.2] Achievements and Advancements not showing up on Discord.

Both 1.10.2 and 1.12.2 Versions of the plugin does has never displayed achievements / advancements in discord not even vanilla ones.

1.12.2:
forge-1.12.2-14.23.1.2566-universal.jar
spongeforge-1.12.2-2555-7.0.0-BETA-2774.jar
MagiBridge-API7-2.4.2.jar

1.10.2:
forge-1.10.2-12.18.3.2477-universal.jar
spongeforge-1.10.2-2477-5.2.0-BETA-2731.jar
MagiBridge-2.4.2.jar

Both Configs:
# Should MagiBridge send achievement get messages to Discord?
achievement-messages-enabled=true

!online Suddenly not Working

I have my online list command for Discord set to .players. Everything was working fine but suddenly (even after multiple restarts), the list just doesn't show. .cmd still works but for some reason the player list isn't.

My config is set to the following for the list:

# Discord command that shows the current online player list
player-list-command=".players"
# Format of the player name displayed in the channel list command (!online)
# Supports %player% and %prefix%
player-list-name="%prefix% %player%"

%toprolecolor%

Could you add a %toprolecolor modifier as well so we can link our role colors from Discord into the Minecraft chat?

Configuration file auto-migration

Currently, when updating the plugin, I have to copy the old config and then delete it, so a new config will be made with the new options. What would be really helpful, and DIscordSRV does this, is if when you get and updated version of the plugin, it would move all your old settings over to the new config, and just leave the new options default. Then mark the old config as config_version[version].conf or something like that. This would make updating a lot easier.

Ignore CustomNPCs messages

Hello! Many NPCs from the CustomNPC mode have their own dialogs.
2017-07-22_04 17 01
2017-07-22_04 16 56
2017-07-22_04 19 46
And all these messages are broadcast to Discord:
screenshot at 22 04-20-03
NPC create for texture Pokemon broadcast messages too:
2017-07-22_04 24 12
screenshot at 22 04-27-57
He is not world lines to dialogs (messages write random time)

Announcements

It would be cool something like:
You have a channel for announcements
when an announcement is posted, it shows on the chat.

Enhancement for commands and display name

It would be nice if there was an option to disable the feature that deletes the !cmd and !online messages, as well as an option to customize how long, in seconds, it takes for these messages to be deleted. I think the !cmd response should be deleted as well, if this feature is enabled. :)

Also, I think there should be a placeholder to get the nucleus /nick (without the formatting of course), and if it is not set, return the real username instead. This way it would be possible to change the webhook name to something like %nick% (%realname%) or simply %nick%.

!online Typo and Formatting Issues

  1. There is a typo in the online player list;
    image

  2. Players' prefixes and names come through the %message% modifier of server-to-discord-format along with the users' message.

  3. The prefix modifier of server-to-discord-format shows the Minecraft chat formatting (color) codes.

image

Error when a specific user writes in Discord

Messages between Discord<->MC were working just fine until one message with an @ mention was sent. Now all messages sent by that specific user (the one who did the mentioning) throw this stacktrace in the console:

[18:49:02] [JDA MainWS-ReadThread/INFO] [STDERR]: [net.dv8tion.jda.core.utils.SimpleLog:print:394]: [18:49:02] [Fatal] [JDA]: One of the EventListeners had an uncaught exception
[18:49:02] [JDA MainWS-ReadThread/INFO] [STDERR]: [net.dv8tion.jda.core.utils.SimpleLog:print:394]: [18:49:02] [Fatal] [JDA]: Encountered an exception:
[18:49:02] [JDA MainWS-ReadThread/INFO] [STDERR]: [net.dv8tion.jda.core.utils.SimpleLog:print:394]: [18:49:02] [Fatal] [JDA]: java.lang.NullPointerException
        at com.magitechserver.magibridge.discord.MessageListener.onMessageReceived(MessageListener.java:37)
        at net.dv8tion.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:386)
        at net.dv8tion.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84)
        at net.dv8tion.jda.core.handle.MessageCreateHandler.handleDefaultMessage(MessageCreateHandler.java:128)
        at net.dv8tion.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:49)
        at net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
        at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:811)
        at net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:516)
        at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
        at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:260)
        at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:238)
        at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:963)
        at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:746)
        at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
        at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
        at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)

All other messaging working just fine.

MCClans clan chat

Hello!
I use plugin MCClans, and Clan Chat messages go in global-discord-channel in Discord(
Use Nucleus, last version.

Bot's playing game by config

It would be good an option on the config (or a command, idk) to change the bot playing state.

Like "playing %game%" or even transmiting.

Weird bug in config file loading

Since I updated to the last version, the config file cannot be changed. If I edit it, when the server starts it gets restored back to the default one. I think it may have to do with the formatting of the channel ids or something like that.

WebHook and Other Formatting Issues

  • WebHooks have the same prefix issues as before.
    image

  • Usernames and prefixes are still coming through the %message% modifier.
    image

  • It would be nice to have a %toprole% modifier for the Minecraft to Discord formats (Including the WebHooks layout). That way we can differentiate our Minecraft prefix layouts from the Discord one.

Receive console MSGs in staff channel

So currently when you use !cmd msg you don't see the response (As it's sent as "-" or "Server") it'd be nice if all the /msgs sent to the Server ("-") would output in the "staff" channel (so that normal players can't see it =D)

Feature Idea: Hover over name in Minecraft for Discord invite

Kind of like how you can hove over a player's name in Minecraft to message them, it would be cool if hovering over a Discord user's name in chat would give the player in invite to the server.

image

So when you hover over someone's name from Discord, it would show something like Message from Discord on the first line, then Join our Discord by clicking. Hopefully the messages and Discord link would all be configureable via the config.

Several issues and enhancements

Hello!

I'm using LP, and prefix is colored, in discord, it looks like: Bot &6[Admin] Wadimich: Проверка, раз раз

I have custom launcher with HD skins support, webhook doesn't support them, looks weird.

Several enhancements:
I need a command to reload config from runtime.
Make additional access to !cmd for second/third discord group to specified commands in config. Like to allow moderators watch ingame chat and mute people, who talks bad.
Allow to translate this: You don't have permission to use the console command!
Allow to translate this: There are no players online!

Localization death messages

Hello! My public all Ru, and messages death in discord go in english.
How switch messages death in Ru language? In the game they are written in Russian.
screenshot at 01 01-00-53

Capitalize first letter of %toprole%

With LuckPerms, a rank cannot begin with a capital letter. It would be great if %toprole% would automatically make the first letter of the role capitalized ([owner] to [Owner]).

Error on plugins reload

As of MagiBridge-2.4.1-all.jar and spongeforge-1.12.2-2529-7.0.0-BETA-2730.jar, when trying to reload the plugins, several errors are reported:

>sponge plugins reload
[19:27:35] [Server thread/INFO] [nucleus]: Server ran the command: /sponge plugins reload
[19:27:35] [Server thread/INFO]: Sending reload event to all plugins. Please wait.
[19:27:35] [Server thread/INFO] [magibridge]: Disconnecting from Discord...
[19:27:35] [Server thread/INFO] [magibridge]: Plugin stopped successfully!
[19:27:35] [Server thread/INFO] [magibridge]: MagiBridge is starting!
[19:27:35] [Server thread/INFO] [net.dv8tion.jda.core.JDA]: Login Successful!
[19:27:35] [JDA MainWS-WriteThread/INFO] [net.dv8tion.jda.core.requests.WebSocketClient]: Connected to WebSocket
[19:27:36] [JDA MainWS-ReadThread/INFO] [net.dv8tion.jda.core.JDA]: Finished Loading!
[19:27:36] [Server thread/INFO] [magibridge]: Hooking into Nucleus
[19:27:36] [Server thread/WARN] [Sponge]: Plugin magibridge attempted to register an already registered listener (com.magitechserver.magibridge.listeners.DeathListener)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]: java.lang.Exception: Stack trace
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at java.lang.Thread.dumpStack(Thread.java:1336)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.event.SpongeEventManager.registerListener(SpongeEventManager.java:217)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.event.SpongeEventManager.registerListeners(SpongeEventManager.java:287)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at com.magitechserver.magibridge.MagiBridge.initStuff(MagiBridge.java:128)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at com.magitechserver.magibridge.MagiBridge.reload(MagiBridge.java:107)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.event.listener.GameReloadEventListener_MagiBridge_reload26.handle(Unknown Source)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:316)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:349)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:333)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:198)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.command.SpongeCommandFactory.lambda$createSpongePluginsCommand$7(SpongeCommandFactory.java:517)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:181)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:360)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:342)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:321)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:432)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524)
[19:27:36] [Server thread/INFO] [STDERR]: [java.lang.Thread:dumpStack:1336]:    at java.lang.Thread.run(Thread.java:748)
[19:27:36] [Server thread/INFO] [magibridge]: Plugin reloaded successfully!

[Idea] Support Discord @Tagging =D

Just an idea, it would be nice if we could support @tagging from MC to Discord, so if someone tags @Asherslab in the server, it'll automatically tag them on Discord as well. it would also be nice if @Asherslabs-discord-nickname would work, but i'm not sure of the Discord API's limitations 😄

Attachments & emoji conversion

  • 1. Discord attachments linked in MC (Show in mc as [Attachment] and the text would link to the file)

  • 2. Change Discord emojis to text-based ones for the MC side of chat.

Chat not going through with Sponge API 7

As of MagiBridge-2.4.2.jar with mods/spongeforge-1.12.2-2555-7.0.0-BETA-2757.jar, chat messages are not being transferred from in-game to the discord channels.
When bridge or a human writes to the discord channel, the following console error appears:

[17:45:14] [Server thread/INFO]: LemADEC joined the game
[17:45:16] [JDA MainWS-ReadThread/ERROR] [net.dv8tion.jda.core.JDA]: One of the EventListeners had an uncaught exception
[17:45:16] [JDA MainWS-ReadThread/ERROR] [net.dv8tion.jda.core.JDA]: Encountered an Exception
java.lang.NoClassDefFoundError: org/spongepowered/api/event/cause/NamedCause
>       at com.magitechserver.magibridge.discord.MessageListener.onMessageReceived(MessageListener.java:28) ~[MessageListener.class:?]
>       at net.dv8tion.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:404) ~[ListenerAdapter.class:?]
>       at net.dv8tion.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84) [InterfacedEventManager.class:?]
>       at net.dv8tion.jda.core.handle.MessageCreateHandler.handleDefaultMessage(MessageCreateHandler.java:128) [MessageCreateHandler.class:?]
>       at net.dv8tion.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:49) [MessageCreateHandler.class:?]
>       at net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37) [SocketHandler.class:?]
>       at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:969) [WebSocketClient.class:?]
>       at net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:661) [WebSocketClient.class:?]
>       at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352) [ListenerManager.class:?]
>       at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:260) [ReadingThread.class:?]
>       at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:238) [ReadingThread.class:?]
>       at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:963) [ReadingThread.class:?]
>       at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:746) [ReadingThread.class:?]
>       at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) [ReadingThread.class:?]
>       at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) [ReadingThread.class:?]
>       at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45) [WebSocketThread.class:?]
[17:45:32] [Server thread/INFO]: Admin LemADEC: test
[17:45:54] [Server thread/INFO]: Admin LemADEC: test

When a player talk in-game (here above with Nucleus-1.2.0-PR4-S7.0-MC1.12.2-plugin.jar, there's no error in console nor message showing up Discord channel.

Enhancement suggestions

Just some ideas to help and improve the plugin:

  • /discord bcast channel - Broadcast messages to discord channel
  • /discord reload - Reload config files
  • Broadcast minecraft achievements and death messages to discord
  • Custom commands - For example, set !givevip %args% and run a set of commands.
  • Show number of online players, TPS and ontime beside the discord servername. This message could change to something customizable like "Server offline" when the server shuts down.
  • Some way to blacklist (or whitelist) channels in which you can use commands.

Thank you and sorry if any of these is already implemented. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.