Important changes for the Plugin API

  • Since we're going to fully rewrite the way how users will be authenticated with the next update (no more unique playernames, users can always change their names etc), this also affects some plugins probably. If a plugin previously used the player name to identify a user, this isn't reliable anymore. Instead, every user will get a globally unique UID, which will never change. For Steam users, this is the SteamID64 (standalone users get a similar ID). We will add a getUID() function to the player object accordingly, which returns a long value.
    If your plugin used the playername to store any player data previously, you have to change it to the UID now.


    I understand that these changes might be tricky in some cases, and I'm sorry for the inconveniences, but unfortunately that's the only way, and getting rid of the HIVE server is inevitable. I promise that there will be no more similar changes in the future, so once you've updated your plugins to use the UID instead of the player name, you never have to deal with it in the future anymore.


    We uploaded a pre-version of the plugin API here: https://download.rising-world.net/api/pre/PluginAPI_Pre.zip
    A pre-version of the game and server will be ready in a few days. We try to fully release the update next week (between 12th and 16th of February).


    If you have any questions or if you need help, please let us know!



  • Ahoy hoy


    Quick question, Area protection (lua) works with playernames. Does this mean lua also gets getUID() or will there be an official area protection (java) to replace the current one?



    i'm mainly still hanging on the year 2015 :rolleyes: this post Important notice / Wichtige Information


    pardon my french but DAMN time goes so quick 8o

  • Lua scripts are indeed a problem... but the original AreaProtection script should still work, since it apparently didn't use the player names to store areas, instead it used the player database ID (player.getDBID()), which is also unique (on the server). So old areas should still work after the update.


    Only adding new players to an area could be tricky, since it uses the getPlayerInformationFromDB(name) function. Probably we will change this function: it either accepts a UID or a player name. If it's a player name, it will only look for players which are currently online. This way, at least the AreaProtection script does not require any changes as far as I can see.


    We will also add a player.getUID() function to Lua (but using player.getDBID() is also sufficient in most cases), but of course it's still our intention to discard the Lua API as soon as possible. We try to get a new AreaProtection plugin ready in the near future ;)


    In a nutshell, these are the changes for the Lua API for this update:

    • Addition of player.getUID() to aquire the player UID
    • getPlayerInformationFromDB() now also accepts a UID. When using a name instead, it only looks for online players


    Are there any other functions or changes required by other scripts?

  • red51

    Closed the thread.

Participate now!

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