World Join and Leave Commands

Discussion in 'Plugin Requests' started by Ian531, Aug 19, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    Ian531

    Plugin category: Technical

    Minecraft version: 1.12

    Suggested name: World Join/Leave Commands

    What I want: I would like a plugin that can execute a specified command upon joining and/or leaving a certain world on my server. I would also like to be able to say if I want it to be executed by the player or by console and would need it to have the playername variable.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: Would like to be able to assign a name to each command in config and then have a permission to assign it to a group. For example, I might have a command where when I leave the world (hub) it would run /heal <player> through console and I could assign the default role joinleave.healcommand.

    When I'd like it by: Two weeks.
     
  2. Offline

    Tango_

    I believe I have completed this to the best of my ability. Here is the link: DOWNLOAD
    The placeholder for the player is %player%
    You can add custom permissions and any command you wish both for joining and leaving specific worlds.
     
  3. Offline

    Ian531

    Wow. Thank you so much. Especially for completing it in such short time. Although I do have a couple issues. First, it doesn't seem to work with Multiverse loaded worlds. It runs the leave and join commands when im going in between the world, world_nether, and world_the_end, but not things such as hub. If this isn't fixable, it's not a big issue. Second, if it could also run the join and leave commands not just on world change, but also when joining the server. For example, if I went from hub to overworld, it would run the command. But if I log out in the overworld and join back, I would like it to run the overworld join commands. If there was an option per command to disable when joining and/or leaving the server that would be nice. Here is an example:
    Code:
      world_nether:
         LoadWorld:
            Console:
               any.permission.here:
                  RunOnJoin: true/false
                  Command:
                  - tell %player% nether loaded
               random.permission:
                  RunOnJoin: true/false
                  Command:
                  - tell %player% welcome to nether
            Player:
               any.permission.here:
                  RunOnJoin: true/false
                  Command:
                  - tell %player% nether loaded'
               random.permission:
                  RunOnJoin: true/false
                  Command:
                  - tell %player% welcome to nether'
    I know this is a lot to ask for, but If it can be done, that would be greatly appriciated. Thanks again, Ian.
     
    Last edited by a moderator: Aug 19, 2018
  4. Offline

    Tango_

    Strange... I can't seem to replicate what you are getting with multiverse, it works fine for me? Make sure you are using the exact name with their upper / lower case letters.

    I was able to find a solution to join commands, this works when you insert "join" into the permission node for the command, so examples of this look like join.random.command or random.join.command. This then allows the commands to be run when joining the server and loading that specific world.

    Here is the newer version: DOWNLOAD
    Generate a new config for a newer template and added info.
    If you are still having issues with Multiverse, let me know.
     
  5. Offline

    Ian531

    Thank you again. This has been very helpful. Unfortunately, I still cannot get the join and leave commands to work when transporting between multiverse loaded or created worlds. I have tried it on multiple servers and it only seems to work with the three default worlds no matter what their names are. If it isn't fixable, that's okay. If you'd like I could create a video showing the problem in greater detail.
     
  6. Offline

    Tango_

    A video would be helpful, could you provide me with what your config looks like too.
     
Thread Status:
Not open for further replies.

Share This Page