Filled Updated PerWorldPlugins

Discussion in 'Plugin Requests' started by Xp10d3, Jan 30, 2020.

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

    Xp10d3

    Hello,
    I own a 1.15 server and need a plugin like PerWorldPlugins that disables other plugins in certain worlds. I do not want to use BungeeCord and already have Multiverse and other plugins. I am fine if you update PerWorldPlugins or just make an entirely new plugin; I just want something that does the same thing.
    Plugin category: Admin tools, PerWorldPlugins
    Minecraft version: 1.14/1.15 AND Spigot support
    What I want: To disable certain plugins specified in certain worlds that are specified and Spigot support. You can update PerWorldPlugins or create an entirely new plugin.
    Ideas for commands: Not needed, but if you want a harder challenge...
    /pw add <plugin name> <world_name> <world_name_2> <world_name_3> etc.: Adds a plugin to the config list along with the world disabled in.
    /pw remove <plugin name> <world_name> <world_name_2> <world_name_3> etc.: Removes a plugin from the config list along with the world disabled in.
    /pw disableall: Disables all plugins.
    /pw reload: Reloads the config.
    /pw enableall: Enables all plugins.
    Ideas for permissions: Not unless you're doing the commands.
    pw.add: Allows permision to do /pw add
    pw.remove: Allows permission to do /pw remove
    pw.disableall: Allows permission to do /pw disbaleall
    pw.reload: Allows permission to do /pw reload
    pw.enableall: Allows permissin to do /pw enableall
    When I'd like it by: As soon as possible.

    EDIT: If it helps I'd like the config to be like this:
    Code:
    location:
      world:
        PermissionsEx:
          - world
          - Spawn
          - world_nether
        WorldEdit:
          - world
    
    This means that PermissionsEx will be disabled/have listeners and commands disabled in the worlds world, Spawn, and world_nether. WorldEdit also will be disabled in the world world. This is just an example.

    In the attempts that I've done I think the best way to go about this is to disable the listeners and commands in certain worlds, checking to see if a player has fired another listener in another plugin. If the plugin matches the config, check to see if the world the player is in matches the world, and if ti does, unregister the listener. Hope this helps. Thanks again.
     
    Last edited: Feb 2, 2020
  2. Offline

    Xp10d3

    Bump
     
  3. Offline

    Xp10d3

    Bump
     
  4. Offline

    Xp10d3

    Bump...
     
  5. Offline

    InstanceofDeath

    Sry, but there is currently no way to manipulate other plugins access via another. For example what should happen if you are a in permission group and teleport into a world where permEx is disabled? Leave the group? Or if you have a selected area from WorldEdit and undo happens after you just toggled off the plugin access on this world. On the other hand recoding permission ex and wolrdedit seems even more horrendous, sry :c. The only thing you could do is remove permissions when the player changes a world, but what would then happen to operators and, can you access all permissions of a single plugin without affecting others?
     
  6. Offline

    Xp10d3

    It's alright. Is it possible for you to update PerWorldPlugins? I have the source code since the owner posted the Github. EDIT: I mostly just want to disable listeners in certain worlds. If you were to move to another world where PermissionsEx is disabled, sure; leaving a group could work. For WorldEdit I have no idea. I just want the listeners/chat stuff to be disabled in certain worlds as well as the commands. Not completely disabling the plugin is alright. As long as the listeners and commands are disabled that's fine. Ex. if right clicking a compass is a listener in one plugin, in certain worlds I'd like that to be disabled, or if mining ores is a listener in one plugin, it's cancelled in another world if activated by one player.
     

    Attached Files:

    • src.zip
      File size:
      10 KB
      Views:
      5
    Last edited: Feb 6, 2020
  7. Offline

    timtower Administrator Administrator Moderator

    @Xp10d3 Might be better to just link the github.
    Actually compiled it but it is giving reflection errors that I didn't further look into yet.
     
  8. Offline

    Xp10d3

  9. Offline

    Xp10d3

    Bump
     
  10. Offline

    Xp10d3

    Bump........................
    EDIT: @InstanceofDeath If it doesn't seem possible could you just update PerWorldPlugins given a provided src?
     
    Last edited: Feb 10, 2020
  11. Offline

    travja

    Is there a particular error or way that PerWorldPlugins breaks?
     
  12. Offline

    Xp10d3

    It says it can't seem to inject into the Bukkit Core or something. I think it has to do with the fact that it's outdated or that I'm using Spigot although I also tried to with normal Bukkit and I got the same error.
     
  13. Offline

    travja

    If you can paste the error, I might be able to take a look at it
     
  14. Offline

    Xp10d3

    Ok. Sorry, I don't have the error at the moment. I can try and post it when I have a chance. Even if I don't get the error are you willing to help update PerWorldPlugins? :)

    EDIT: Got it. Or at least some of it. This is from the code but it is the error I get, but not the whole thing.
    Code:
    PerWorldPlugins failed injecting with the new PluginLoader, contact the developers on BukkitDev!
    
     
  15. Offline

    timtower Administrator Administrator Moderator

    IllegalArgumentException when injecting the FakeSimpleCommandMap
     
    Xp10d3 likes this.
  16. Offline

    Xp10d3

    Yes, sorry. I believe that's the full error.
    EDIT: When that happens PWP doesn't run at all but I think that was obvious :p
     
    Last edited: Feb 11, 2020
  17. Offline

    travja

    I dug into the code a little bit. I'm unsure if the plugin functions as I haven't tested it aside from checking to make sure it boots. You can download a jar here. Basically, the plugin was trying to inject the CommandMap into Bukkit.getServer() and the CommandMap has been moved to the PluginManager.
     
  18. Offline

    Xp10d3

    Tysm!!! I'll be sure to test it myself. If I run into any errors I'll let you know :D :D :D
    EDIT: Works perfectly! Thank you so much travja :D Marking thread as filled
     
    Last edited: Feb 11, 2020
    travja likes this.
Thread Status:
Not open for further replies.

Share This Page