[PLUGIN REQ] Save last player location for specific worlds only

Discussion in 'Spigot Discussion' started by mariolatif741, Jul 9, 2018.

  1. Hello,

    I want to save the last player locations for "SPECIFIC" words only that can be done in the configuration for example - so, the players will be spawned in the last location they were before.
    - I am using Multiverse.
    I searched all over the Internet and here are the results:

    - I used Multiverse-Inventories with the Multiverse core and added the "last_location" option in the Multiverse Inventories's config file as explained here: https://bukkit.org/threads/spawning-in-last-location-on-world-change-multiverse.232855/ - However, this will be applied to all the worlds while I want specific worlds only.

    - I found the plugin which I exactly wanted here: https://www.spigotmc.org/resources/stayput.34848/ - But, the player's locations are not saved when the player quits the server... It is saved only on switching the worlds :/

    --- EDIT ---

    Here is the source code of StayPut: https://github.com/Taronyuu/StayPut/

    I tried to edit the Main java class and add the following imports:

    Code (Java):
    import org.bukkit.event.player.PlayerListener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.event.player.PlayerQuitEvent;
    and I added this too:

    Code (Java):
        public void onPlayerQuit(PlayerQuitEvent event) {
    But I never can compile this because I don't know! :/

    I really need help on this :/ I am a good developer in everything except for Java (I never tried to even create a hello world program).

    #1 mariolatif741, Jul 9, 2018
    Last edited: Jul 9, 2018