[Plugin API help]Is it possible to connect Rising World and Discord?

  • Hi folks, I am learning to code a plugin for Rising World but I feel stuck...
    Could any of you answer the following question?

    Is it possible to make a plugin that connects Rising World and Discord?

    To allow players call for help when admin's not in game but on Discord

    [My knowlodge]
    I have just begun learning Java 8 SE, Rising World API, and Discord API
    I have little idea how and what exactly API allows

    I looked into ConnectTS plugin for a clue, but it seems simply to bypass preset TeamSpeak server information to stand-alone TeamSpeak client if available.
    I would like a direct connection between Discord and Rising World, but I see no classes to request/listen connection on Plugin Javadoc.
    I'd appreciate any advice on where to look!

    My thanks in advance.



  • Yes it is possible and we're actually already running our ingame Bot together with Discord on Serenity.
    I'm horrible at explaining stuff so i'll just keep it short to not confuse.

    Register and authorise a Discord bot here https://discordapp.com/developers/applications/me

    I use Discord4J but you can use JDA since i've got a video for you showing you how to with JDA here

    You make a plugin that imports the JDA libraries and you make your game onCommand listen to things like /admin for example
    have it forward a message to your discord server and voila

    you've got yourself an admin notifier from game -> to discord :thumbsup:

    I dont really recommend this type of project if you're just new to Java but it's great to try it step by step

    recap ---------------------------

    - start with your plugin that listens and reponds to commands

    7 public void onPlayerCommand(PlayerCommandEvent event){
    8 Player p = event.getPlayer();
    9 testList.add(p.getName());
    10 //do something else
    11 }

    after getting that operational theres two ways

    either you learn how to use a dependency management system Maven or Gradle (long way, steep learning curve but it pays off in the end)
    or you manually download JDA and all its dependancies (shortcut old way but pain in the butt)

    you'll need to import those libraries into your plugin and start programming sort of like in the video (read documentation tho things might have changed since 2016 )

    then have your onCommand part of the prlugin interact with discords 'sendMessage'


Participate now!

Don’t have an account yet? Create a new account now and be part of our community!