Giter Site home page Giter Site logo

discordsrv / discordsrv Goto Github PK

View Code? Open in Web Editor NEW
947.0 28.0 470.0 15.05 MB

Discord bridging plugin for block game https://modrinth.com/plugin/discordsrv

Home Page: https://discordsrv.com

License: GNU General Public License v3.0

Java 100.00%
discord minecraft bukkit bukkit-plugin discord-bot jda spigot discordsrv hacktoberfest

discordsrv's Introduction

A Minecraft to Discord and back link plugin

Thanks to:

Jetbrains IntelliJ IDEA

The Java IDE for Professional Developers by JetBrains

JProfiler

JProfiler's intuitive UI helps you resolve performance bottlenecks, pin down memory leaks and understand threading issues.

discordsrv's People

Contributors

actions-user avatar alex4386 avatar androkai avatar anutley avatar bluetree242 avatar cale111 avatar charly6596 avatar dinty1 avatar granny avatar greemdev avatar james-bennett-295 avatar jvdoorn avatar kizajan avatar lagnat avatar loohp avatar madis0 avatar majekdor avatar metalshark avatar rezzedup avatar scarsz avatar shapelayer avatar snaptraks avatar srlcore avatar thereverend403 avatar time6628 avatar tomkeuper avatar ucchyocean avatar underscore11code avatar vankka avatar yyrichy 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

discordsrv's Issues

Name threads

Having them come up in the console as Thread-15 or whatever is amateur as fuck

Private channels are broadcasted to Discord

Can you please either implement a single ingame channel for discord broadcasts or create a blacklist of channels that cannot be broadcasted...

Faction/Allies channels, Town / Nation channels etc shouldn't be broadcasted to the whole server...

BungeeCord

Hello!

I currently run a BungeeCord server, and would love to integrate with discord. However, I don't want to put DiscordSRV in every server, and would rather just to put it in bungee. I use VentureChat, so it's integration drew me to this plugin vs others that support bungee but not VC.

If you have no plans for BungeeCord that is fine, but it'd be nice to have one less plugin to put in every server / sync configs.

Thanks!

Server offline channel topics

Hey could you add a config option to disable changing the channel topic so that it does not change it at all
Also when the server shutdowns can you make the channel topic say Server Offline or add another config options for it :)

1.9 Spigot - DiscordSRV Release 7

Minecraft to Discord channel works perfectly, however Discord to Minecraft generates this error:

[13:13:07 WARN]: [13:13:07] [Fatal] [JDASocket]: Encountered an exception:
[13:13:07 WARN]: java.lang.NullPointerException
[13:13:07 WARN]:        at com.scarsz.discordsrv.DiscordListener.handleChat(DiscordListener.java:125)
[13:13:07 WARN]:        at com.scarsz.discordsrv.DiscordListener.onMessageReceived(DiscordListener.java:46)
[13:13:07 WARN]:        at net.dv8tion.jda.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:179)
[13:13:07 WARN]:        at net.dv8tion.jda.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:54)
[13:13:07 WARN]:        at net.dv8tion.jda.handle.MessageReceivedHandler.handle(MessageReceivedHandler.java:58)
[13:13:07 WARN]:        at net.dv8tion.jda.requests.WebSocketClient.onTextMessage(WebSocketClient.java:166)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:233)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:211)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:910)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:693)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:102)
[13:13:07 WARN]:        at com.neovisionaries.ws.client.ReadingThread.run(ReadingThread.java:61)

INVOKESPECIAL/STATIC on interfaces require ASM 5

Hello, i want to test the new unique playercount but the plugin don't work with thermos. I use the last thermos version Build 58: https://github.com/CyberdyneCC/Thermos/releases
I have test it whit spigot 1.7.10 only and the plugin works. It's a thermos issue. can you fix this or should i write to thermos developer?
Discord V11 works fine whit thermos Build 58. Now you have fixed the unique playercount and i cannot use it :(

[21:16:13] [Server thread/INFO]: [DiscordSRV] Enabling DiscordSRV v12.0
[21:16:14] [Server thread/INFO]: [DiscordSRV] [JDA] JDA starting...
[21:16:14] [Server thread/ERROR]: Error occurred while enabling DiscordSRV v12.0 (Is it up to date?)
java.lang.NoClassDefFoundError: com/scarsz/discordsrv/jda/managers/AccountManager
    at com.scarsz.discordsrv.jda.entities.impl.JDAImpl.login(JDAImpl.java:127) ~[?:?]
    at com.scarsz.discordsrv.jda.JDABuilder.buildAsync(JDABuilder.java:287) ~[?:?]
    at com.scarsz.discordsrv.jda.JDABuilder.buildBlocking(JDABuilder.java:308) ~[?:?]
    at com.scarsz.discordsrv.DiscordSRV.buildJda(DiscordSRV.java:592) ~[?:?]
    at com.scarsz.discordsrv.DiscordSRV.onEnable(DiscordSRV.java:196) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[JavaPlugin.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368) [JavaPluginLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410) [SimplePluginManager.class:1.7.10-1614.58]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:438) [CraftServer.class:1.7.10-1614.58]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:372) [CraftServer.class:1.7.10-1614.58]
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:519) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:493) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:453) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:337) [lt.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.ClassNotFoundException: Failed to remap class com.scarsz.discordsrv.jda.managers.AccountManager
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:534) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:455) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211) ~[PluginClassLoader.class:1.7.10-1614.58]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
    ... 16 more
Caused by: java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5
    at org.objectweb.asm.MethodVisitor.visitMethodInsn(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.a(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.b(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:246) ~[JarRemapper.class:?]
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:232) ~[JarRemapper.class:?]
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:499) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:455) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211) ~[PluginClassLoader.class:1.7.10-1614.58]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
    ... 16 more

Colors not replacing in VentureChat ChatChannelHookMessageFormat

Normal ChatChannelHookMessageFormat is:
ChatChannelHookMessageFormat: "%channelcolor%[%channelnickname%]&r %message%"

With VentureChat (only tested with it till now) I have to replace & with § to make it work:
ChatChannelHookMessageFormat: "%channelcolor%[%channelnickname%]§r %message%"

I also use colorcodes I had to replace for my own format:
ChatChannelHookMessageFormat: "§8[%channelcolor%%channelnickname%§8]§r %message%"

Maybe this also have to be done for other chatchannel-plugins (needs testing).

The second problem is that Venturechat define color as text within config which is normally replaced later but in combination with DiscordSRV this doesn't work and results in something like that:

DiscordSRV-config:

ChatChannelHookMessageFormat: "§8[%channelcolor%%channelnickname%§8]§r %message%"

VentureChat-config:

channels:
  Admin:
    color: red
    chatcolor: red
    mutable: false
    filter: false
    autojoin: true
    default: false
    distance: 0
    cooldown: 0
    bungeecord: false
    alias: a
    permissions: adminchannel
    format: '&f[&cAdmin&f] {prefix} {nickname}&c:'
    irc: false

Output:
Output

"red" as the channelcolor in front of channelnickname (which is short "a" for AdminChannel) is no longer replaced correctly. I also experimented with using &c or §c in the VentureChat-config but this doesn't work at all.

Discord Bot Token

Hey, can you please add login with token function, but i created a Discord Bot with the Official Discord API and now just can login with a token :)

Regards Kiyo

Error at startup - ClassNotFoundException

[13:46:06] [Server thread/ERROR]: Could not load 'plugins/DiscordSRV.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: com/scarsz/discordsrv/google/common/collect/Lists
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.loadPlugins(CraftServer.java:297) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:203) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:535) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
Caused by: java.lang.NoClassDefFoundError: com/scarsz/discordsrv/google/common/collect/Lists
        at com.scarsz.discordsrv.objects.CancellationDetector.<init>(CancellationDetector.java:23) ~[?:?]
        at com.scarsz.discordsrv.DiscordSRV.<clinit>(DiscordSRV.java:82) ~[?:?]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_102]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_102]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        ... 6 more
Caused by: java.lang.ClassNotFoundException: com.scarsz.discordsrv.google.common.collect.Lists
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_102]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_102]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_102]
        at com.scarsz.discordsrv.objects.CancellationDetector.<init>(CancellationDetector.java:23) ~[?:?]
        at com.scarsz.discordsrv.DiscordSRV.<clinit>(DiscordSRV.java:82) ~[?:?]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_102]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_102]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        ... 6 more

Skript integration

I know very little about Skript so if any other developer wants to help out for this one I'd appreciate it

Console, but filtered

Can we possible get the ability to only send WARN or SEVERE or ERROR messages to a discord console channel?
That way we get a self populating list of issues that can be accessed from any device.

Add access to variables for canned responses

Allowing access to variables in canned responses would enable more dynamic custom commands.
The more information accessible from the Minecraft server (and plugins) the better.

That would also allow users to write their own "playerlist" command if so desired and also display other information to any user.

Using /discord without parameter throws ArrayIndexOutOfBoundsException

>discord
[19:13:03 INFO]: Join us on Discord at http://discord.gg/changethisintheconfig. For command help, do "/discord ?"
[19:13:03 WARN]: Unexpected exception while parsing console command "discord"
org.bukkit.command.CommandException: Unhandled exception executing command 'discord' in plugin DiscordSRV v11.666
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchServerCommand(CraftServer.java:632) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at net.minecraft.server.v1_10_R1.DedicatedServer.aL(DedicatedServer.java:438) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:401) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:668) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:567) [craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at com.scarsz.discordsrv.DiscordSRV.onCommand(DiscordSRV.java:404) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit_baucraft.jar:git-Spigot-90f61bc-5e5cf84]
        ... 8 more

PurpleIRC Support

Request to add PurpleIRC support (maybe even work with that dev?) so that chat messages are shown from Discord ->IRC and vice versa

Canned response triggers should not be caps sensitive

Example

So this is what my current configuration file looks like:

DiscordCannedResponses: {"!ip": "mc.example.com"}

And let’s say Jon wants the server IP. He types !Ip. But nothing happens. Everything looks fine and diddly so Jon pings me and I have to explain to him that canned responses are caps sensitive. Isn’t that mildly annoying?

Conclusion

This issue can be temporarily fixed by adding multiple triggers with different capitalization that do the same thing, but this is a pretty awful solution:

DiscordCannedResponses: {"!ip": "mc.example.com", "!Ip": "mc.example.com", "!IP": "mc.example.com", "!iP": "mc.example.com"}

I’m pretty sure most people expect this kind of behavior from bots anyways. And if that’s not the case you could just make this an option in the configuration file.

Optional logging of Discord messages to the console

Would make it easier to understand what people are talking about from the console and would also help when reviewing logs, but I can also see some people not wanting their console logs to be spammed with Discord messages.

Make un-/subscribe message translatable

Make those to messages translatable via config:

subscribe: "You have been subscribed to Discord messages."
unsubscribe: "You no longer subscribed to Discord messages."

Auto delete !c messages after a configurable delay

Automatically delete !c messages sent from Discord to DiscordSRV and/or the response sent back to Discord after a configurable delay (which could be set to -1 to disable or 0 for immediate deletion), for example:

# DiscordChatChannelConsoleCommandIncomingMessageDeletionDelay: the delay for autodeleting incoming console command messages (set to -1 to disable)
# DiscordChatChannelConsoleCommandOutgoingMessageDeletionDelay: the delay for autodeleting outgoing console command messages (set to -1 to disable)
DiscordChatChannelConsoleCommandIncomingMessageDeletionDelay: 0
DiscordChatChannelConsoleCommandOutgoingMessageDeletionDelay: 10

Would be useful, since I don't want Discord users to even see the console commands sent to MC and the console channel feature causes us to hit the Discord rate limits fairly frequently.

Join/Leave messages not showing up

Disabling that the join messages not coming to discord (config option)

and ranks not showing on join
config:
MinecraftPlayerJoinMessageEnabled: true
MinecraftPlayerJoinMessageFormat: "[+] %displayname%"
MinecraftPlayerLeaveMessageEnabled: true
MinecraftPlayerLeaveMessageFormat: "[-] %displayname%"
in discord:
[+] user
[-] [Member] user


When users have /OP the join and leave messages don't show up in discord (GroupManager)

Catch NullPointerException at plugin-shutdown

This appears in log every servershutdown since channel topic updater was introduced if I'm right.

[01:02:43 WARN]: java.lang.NullPointerException
[01:02:43 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.run(ChannelTopicUpdater.java:36)

Sponge

We need sponge support! Preferably API 5

Switch Update-check to GitHub

This idea is work in progress. I was unhappy with the #CUSTOM-variable which needs an additional sed-command to overwrite and depends on the build-server so I searched for an alternative and found a Maven plugin which get the hash for the build. Next I experimented with the GitHub-API and get first ideas about how this could look like. The example below shows some parts for a check against the latest dev-build. For a check against the latest official release there are other possibilities like using the releases on GitHub and check against this one or make use of tags or only commit release-versions to the master-branch. I thought about a possibility to check against develop or stable builds editable in the config.

pom.xml - Maven-plugin which get the build-hash and save it into ${buildNumber}

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>true</doCheck>
                    <doUpdate>false</doUpdate>
                </configuration>
            </plugin>
        </plugins>
    </build>

This can be for example used within plugin.yml:
e.g.: version: ${project.version}-${buildNumber}
Saving in java/class-files is tricky so I recommend saving it in plugin.yml or an extra file in ressoures-folder.

Check for GitHub-API status
https://status.github.com/api/status.json

{"status":"good","last_updated":"2016-09-10T00:36:08Z"}

Possible status: "good"=green, "minor"=yellow or "major"=red

Validate sha
https://api.github.com/repos/Scarsz/DiscordSRV/commits/[sha of build]
If invalid returns as JSON-text:

{
  "message": "Not Found",
  "documentation_url": "https://developer.github.com/v3"
}

Get sha of latest commit from master
https://api.github.com/repos/Scarsz/DiscordSRV/git/refs/heads/master
https://api.github.com/repos/Scarsz/DiscordSRV/git/refs/heads/develop

{
  "ref": "refs/heads/develop",
  "url": "https://api.github.com/repos/Scarsz/DiscordSRV/git/refs/heads/develop",
  "object": {
    "sha": "e1204d9cca3bd08a1352609b4c27b23a808a16b2",
    "type": "commit",
    "url": "https://api.github.com/repos/Scarsz/DiscordSRV/git/commits/e1204d9cca3bd08a1352609b4c27b23a808a16b2"
  }
}

Compare builds against each other
https://api.github.com/repos/Scarsz/DiscordSRV/compare/[sha_of_latest_version/master]...[sha_of_build]
e.g.:
https://api.github.com/repos/Scarsz/DiscordSRV/compare/e1204d9cca3bd08a1352609b4c27b23a808a16b2...7fcce2be418ffa8d2f4813af076aafb8e627c8d9
returns:

{
...
  "status": "behind",
  "ahead_by": 0,
  "behind_by": 18,
...
}

Put a zero-width space in %username% and %displayname% to prevent ping spam.

If a user has the same discord name as their Minecraft username, any message they send from Minecraft to Discord will (by default) ping that user if they are in a channel with the bot.

Obviously this is not ideal, so I propose putting a zero-width space before each character in the string before doing token replacements on %username% and %displayname%. This way, the username will appear normal on both ends of the link, but users shouldn't be pinged because the zero-width spaces cause the string to be different.

Private messaging system

Implement a private message system, like:

In the server, a person use /dtell
And the bot account, in Discord, sends the message in private to the .

On Discord, a person sends a private message to the bot like !tell and the message is sent to the player in-game.

JDA Socket Disconnected

recently noticed this error on the server console
Using kCauldron 1.7.10 for Spigot/Forge

[11:00:28 WARN]: [11:00:28] [Fatal] [JDARequester]: Encountered an exception:
[11:00:28 WARN]: com.mashape.unirest.http.exceptions.UnirestException: java.net.UnknownHostException: discordapp.com
[11:00:28 WARN]: at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143)
[11:00:28 WARN]: at com.mashape.unirest.request.BaseRequest.asString(BaseRequest.java:56)
[11:00:28 WARN]: at com.scarsz.discordsrv.jda.requests.Requester.exec(Requester.java:92)
[11:00:28 WARN]: at com.scarsz.discordsrv.jda.requests.Requester.post(Requester.java:57)
[11:00:28 WARN]: at com.scarsz.discordsrv.jda.entities.impl.TextChannelImpl$AsyncMessageSender$Runner.run(TextChannelImpl.java:505)
[11:00:28 WARN]: Caused by: java.net.UnknownHostException: discordapp.com
[11:00:28 WARN]: at java.net.InetAddress.getAllByName0(InetAddress.java:1280)
[11:00:28 WARN]: at java.net.InetAddress.getAllByName(InetAddress.java:1192)
[11:00:28 WARN]: at java.net.InetAddress.getAllByName(InetAddress.java:1126)
[11:00:28 WARN]: at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
[11:00:28 WARN]: at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)
[11:00:28 WARN]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
[11:00:28 WARN]: at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
[11:00:28 WARN]: at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
[11:00:28 WARN]: at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[11:00:28 WARN]: at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[11:00:28 WARN]: at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[11:00:28 WARN]: at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
[11:00:28 WARN]: at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
[11:00:28 WARN]: at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
[11:00:28 WARN]: at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
[11:00:28 WARN]: at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:138)

PlayerQuitEvent Error

Hi there, DiscordSRV throws an error when a player leaves the game. It seems to be related to ChatColor within bungee, perhaps an incorrect import?

[01:13:29] [Server thread/INFO]: xDeeKay lost connection: Disconnected
[01:13:29] [Server thread/ERROR]: Could not pass event PlayerQuitEvent to DiscordSRV v3.0
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.PlayerList.disconnect(PlayerList.java:332) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:813) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.NetworkManager.l(NetworkManager.java:302) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.ServerConnection.c(SourceFile:165) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:748) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:335) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:632) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:540) [craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]
Caused by: java.lang.NoClassDefFoundError: net/md_5/bungee/api/ChatColor
at com.scarsz.discordsrv.PlayerLeaveListener.PlayerQuitEvent(PlayerLeaveListener.java:24) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[craftbukkit-1.8-R0.1-SNAPSHOT.jar:git-Bukkit-994b2aa]
... 12 more
[01:13:29] [Server thread/INFO]: xDeeKay left the game.

SimpleMention Integration

Hello! Recently, I installed this plugin called SimpleMention, GitHub Page, and some of my players liked it for when they try to get another person's attention when that person isn't paying attention to chat. I noticed that it wasn't working for some names and originally wondered why, then found out that it was because of DiscordSRV. I was wondering if possibly it could be integrated with SimpleMention so that if you are talking from Discord to Minecraft, it would not cancel the action of SimpleMention. For example, the input would be on Discord like this and the output would be on Minecraft like this (or to whatever I set the color of the mention in Minecraft to) and from Minecraft to Discord would be like if I said "@Diamondman121314" in the Minecraft chat, it would go show the way I set SimpleMention to show it so it would be like this instead of this and SimpleMention wouldn't be canceled. Thanks!

Capital letter issue Colors.json

The colors.json file does not allow capital letters.
When you do put them in they are not registered as a capital letter but as a normal letter.

I was told that this issue was supposed to be fixed, however I have not yet been able to get it working with the latest snapshot.

Input would be "[Admin]" output is "[admin]"

Thanks for your time :)

Retire channels.json

Switch to having the channels in a map in config.yml

Syntax channels: {"global": "NUMERICALCHANNELID", "whatever": "NUMERICALCHANNELID"}

Option to enable bot changing nickname, rather than appending username in message.

Hi there. I did a little research and I think this should be possible. Basically. the idea would be let the bot change its nickname instead of putting "Username: " in front of the message. It could change for every message echoed to be the name of the person talking. It looks like discord limits nickname changes to 1800 times an hour, which for most servers would be plenty.

My goal here is that I need certain commands to be the first thing in the message for another bot to react to. So instead of "WACOMalt: !playlist" it needs to see just "!playlist". the only way I can think of making this work is this solution, or getting the other dev to add support for commands in the middle of the messages. (Which I'm also pushing for).

Would love to hear feedback on the idea. I'm sure there's more insight you guys could offer than I have been able to find.

Length limit

[Server] WARN [DiscordSRV] Tried sending message with length of 2244 (244 over limit)

Everytime I try to send a message in MC this appears, and I can't send in Discord to MC too.

Venturechat filter integration

Hello,

It seems discordsrv do not have compatibility with venturechat filter. While in game venture chat censor bad words people use, they will still appear bad words on discord. Here is sample:
I type in game: discordsrv chat filter test: asssprinkle in which in game will get filtered for bad words and display this instead:
http://image.prntscr.com/image/42ca735bdd044c50ad5bd7601fe68ddb.png
But yet in the discord chat it show the actual word:
http://image.prntscr.com/image/1f91277c3207453c8751a5c1aaa9281d.png

Switch to GitHub Gists for debug reporting

At the moment hastebin is overloaded and returns 503 "internal server error" errors. We should add a fallback for this. I think about writing it to a file, e.g. plugins/DiscordSRV/debug/<timestamp>.log and inform the user about what to do.

Here is the log:

[13:06:13 INFO]: Player issued server command: /discord debug
discord debug
[13:06:34 INFO]: [DiscordSRV] Chat: [Discord | Owner] Player: /discord debug
[13:06:44 WARN]: java.io.IOException: Server returned HTTP response code: 503 for URL: http://hastebin.com/documents
[13:06:44 WARN]:        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
[13:06:44 WARN]:        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
[13:06:44 WARN]:        at com.scarsz.discordsrv.util.DebugHandler.run(DebugHandler.java:149)
[13:06:44 WARN]:        at com.scarsz.discordsrv.DiscordSRV.onCommand(DiscordSRV.java:509)
[13:06:44 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[13:06:44 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140)
[13:06:44 WARN]:        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.PlayerConnection.handleCommand(PlayerConnection.java:1351)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1186)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[13:06:44 WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[13:06:44 WARN]:        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:732)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:400)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:668)
[13:06:44 WARN]:        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:567)
[13:06:44 WARN]:        at java.lang.Thread.run(Thread.java:745)
[13:06:44 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'discord' in plugin DiscordSRV v12.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) ~[spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) ~[spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.PlayerConnection.handleCommand(PlayerConnection.java:1351) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1186) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_72]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_72]
        at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:732) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:668) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:567) [spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
        at com.scarsz.discordsrv.util.DebugHandler.run(DebugHandler.java:156) ~[?:?]
        at com.scarsz.discordsrv.DiscordSRV.onCommand(DiscordSRV.java:509) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.10.2.jar:git-Spigot-1e4dd71-5e5cf84]
        ... 15 more

PremiumVanish

[02:32:20 WARN]: java.lang.NullPointerException
[02:32:20 WARN]:        at de.myzelyam.premiumvanish.bukkit.utilities.BukkitUtils.getOnlineVanishedPlayers(BukkitUtils.java:206)
[02:32:20 WARN]:        at de.myzelyam.api.vanish.VanishAPI.getInvisiblePlayers(VanishAPI.java:23)
[02:32:20 WARN]:        at com.scarsz.discordsrv.hooks.PremiumVanish.isVanished(PremiumVanish.java:8)
[02:32:20 WARN]:        at com.scarsz.discordsrv.VanishedPlayerCheck.checkPlayerIsVanished(VanishedPlayerCheck.java:15)
[02:32:20 WARN]:        at com.scarsz.discordsrv.DiscordSRV.getOnlinePlayers(DiscordSRV.java:520)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.applyFormatters(ChannelTopicUpdater.java:57)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.run(ChannelTopicUpdater.java:29)
[02:32:20 WARN]: java.lang.NullPointerException
[02:32:20 INFO]: *** issued server command: /plugman unload PremiumVanish
[02:32:20 WARN]:        at de.myzelyam.premiumvanish.bukkit.utilities.BukkitUtils.getOnlineVanishedPlayers(BukkitUtils.java:206)
[02:32:20 WARN]:        at de.myzelyam.api.vanish.VanishAPI.getInvisiblePlayers(VanishAPI.java:23)
[02:32:20 WARN]:        at com.scarsz.discordsrv.hooks.PremiumVanish.isVanished(PremiumVanish.java:8)
[02:32:20 WARN]:        at com.scarsz.discordsrv.VanishedPlayerCheck.checkPlayerIsVanished(VanishedPlayerCheck.java:15)
[02:32:20 WARN]:        at com.scarsz.discordsrv.DiscordSRV.getOnlinePlayers(DiscordSRV.java:520)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.applyFormatters(ChannelTopicUpdater.java:57)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.run(ChannelTopicUpdater.java:29)
[02:32:20 WARN]: java.lang.NullPointerException
[02:32:20 WARN]:        at de.myzelyam.premiumvanish.bukkit.utilities.BukkitUtils.getOnlineVanishedPlayers(BukkitUtils.java:206)
[02:32:20 WARN]:        at de.myzelyam.api.vanish.VanishAPI.getInvisiblePlayers(VanishAPI.java:23)
[02:32:20 WARN]:        at com.scarsz.discordsrv.hooks.PremiumVanish.isVanished(PremiumVanish.java:8)
[02:32:20 WARN]:        at com.scarsz.discordsrv.VanishedPlayerCheck.checkPlayerIsVanished(VanishedPlayerCheck.java:15)
[02:32:20 WARN]:        at com.scarsz.discordsrv.DiscordSRV.getOnlinePlayers(DiscordSRV.java:520)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.applyFormatters(ChannelTopicUpdater.java:57)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.run(ChannelTopicUpdater.java:29)
[02:32:20 WARN]: java.lang.NullPointerException
[02:32:20 WARN]:        at de.myzelyam.premiumvanish.bukkit.utilities.BukkitUtils.getOnlineVanishedPlayers(BukkitUtils.java:206)
[02:32:20 WARN]:        at de.myzelyam.api.vanish.VanishAPI.getInvisiblePlayers(VanishAPI.java:23)
[02:32:20 INFO]: [PremiumVanish] Disabling PremiumVanish v1.5.1
[02:32:20 WARN]:        at com.scarsz.discordsrv.hooks.PremiumVanish.isVanished(PremiumVanish.java:8)
[02:32:20 WARN]:        at com.scarsz.discordsrv.VanishedPlayerCheck.checkPlayerIsVanished(VanishedPlayerCheck.java:15)
[02:32:20 WARN]:        at com.scarsz.discordsrv.DiscordSRV.getOnlinePlayers(DiscordSRV.java:520)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.applyFormatters(ChannelTopicUpdater.java:57)
[02:32:20 WARN]:        at com.scarsz.discordsrv.threads.ChannelTopicUpdater.run(ChannelTopicUpdater.java:29)
[02:32:26 INFO]: __ issued server command: /warp ag
[02:32:40 INFO]: __ issued server command: /money
[02:33:08 INFO]: __ issued server command: /is go
[02:35:26 INFO]: Fetching all players.......

Spams the console

Wrong unique Playercounter on modserver

wrongconuter

For the discord "unique players joined" the plugin count all files in payerdata. but on a modpackserver the mods itself make own files from each player. on my server are 3 players joined. but discordsrv says 13.
you must only count the .dat files from minecraft itself to work.

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.