PLUGIN IN ONE WORLD!

Discussion in 'Archived: Plugin Requests' started by wilsondc15, May 19, 2012.

?

Does This Plugin Sound Like A Good Idea?

  1. HECK YA!

    15 vote(s)
    100.0%
  2. no.

    0 vote(s)
    0.0%
  1. Offline

    wilsondc15

    Plugin category: Administration

    Suggested name: PluginWorlds

    A bit about me: I would like to start developing plugins

    What I want: I think a great plugin to make is one where you can control plugins so they only work in certain worlds!

    I am sorry if there is already a plugin that does this and I dont know about it just please tell me then.

    EXAMPLE:
    I was looking forward to having Multiverse installed then 1 world that is a RPG and other worlds normal, but the rpg plugins only work in the RPG world.

    Thanks for reading and if you make one or know of an existing plugin that does this please tell me, Thank You!
    Ideas for commands:

    Ideas for permissions:

    When I'd like it by: idk, soon would be cool
     
  2. Offline

    turt2live

    This is up to each plugin developer as they would have to add extensive Multi-World support to their own plugin. There is no way to do it from an external plugin unless the original author supports it
     
  3. Offline

    zathrus

    this is quite a moloch task to do really... I will explain in detail, but first let me say that it would be MUCH easier to set up 2 servers and connect them with a plugin that allows teleportation from one server to another, so you can have those worlds separated this way

    it's not much of a problem to check PlayerCommandPreprocessEvent and cancel all commands in worlds where they should not be enabled (like cancelling /jobs command in worlds where no jobs should be allowed)

    however, for the second part - there are event listeners involved that are registered by a plugin for all worlds, unless the plugin itself is dividing their usage per world

    what this means is that if the plugin Jobs registers even listener that listens on each block break and updates player experience, it does so for ALL worlds and the only way to cancel this would be to create your own block break listener and do a setCancelled(true) on it

    the latter will ONLY work if Jobs plugin is aware of cancelled events (by doing isCancelled() check in its own listener) and follow this architecture, this omitting experience raise for the player

    also, you would need to listen on Lowest priority with your own plugin, so you can cancel the break event as the first one, before any other plugin gets its hands on it... not to mention calling event listening functions of all plugins that SHOULD work in that world manually somehow after you cancel them listening to this event

    as you can see, it's almost impossible to create such a plugin unless the plugin you're controlling is commands-only plugin
     
    wilsondc15 likes this.
  4. Offline

    turt2live

    There is another issue: Plugin A and Plugin B use BlockBreakEvent, but Plugin A needs to work on World 1 and Plugin B needs to work on World 2 (and A is disabled on 2, and B is disabled on 1). If you cancel the break event then neither A or B get the event (assuming proper care is taken)... but both need to work in different worlds.
     
  5. Offline

    wilsondc15

    thank you! very interesting and informative! i actually wanted the plugin to only be commands and even though it would be hard to make i am glad its possible!

    zathrus
    the 2 server idea is also good, what plugin would you recommend for server-to-server teleporting?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  6. Offline

    Royalgamer06

    I wanted this too a long time ago, but if you use permissions it works quite well!
     
  7. Offline

    wilsondc15

    what do you mean? can you explain?
     
  8. Offline

    ಠ_ಠ

    Dont most permissions plugins allow this anyways? just use the world: feature...?
     
  9. Offline

    zathrus

    interesting stuff, never heard about per-world permission... gotta study, thx for the tip!

    unfortunately I never tried any of them, so I cannot... but you might be able to use per-world permissions as other stated here as well

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
    wilsondc15 likes this.
  10. Offline

    Royalgamer06

    seriously? I use essgroupmanager...
     
  11. Offline

    zathrus

    yeah really... I use PermissionsEX but there was never a need to implement this for me... now that I read their docs, it clearly described the feature... it's really nice to know :)
     
  12. Offline

    wilsondc15

    i knew about the per-world permission feature for PermissionsEX i use for my creative world on my server so they can use mods and fly

    are you talking about per-world permissions or plugins that can be configured to work only in one world?
     
  13. Offline

    ಠ_ಠ

    You can do both with the world: part... just use the negative permissions in the worlds you dont want it in. like
    Code:
     default:
        default: true
        permissions:
        - essentials.sethome
        - essentials.home
        - essentials.warp
        - darkbrotherhood.use.shuriken
        - essentials.list
        - essentials.help
        - essentials.spawn
        - multiverse.portal.access.*
        - chairs.*
        - essentials.signs.use.*
        - iconomy.payment
        - iconomy.access
        - allowlockpicking.canpick
        worlds:
          Survival:
            permissions:
            - -factions.claim
            - -factions.autoclaim
            - -factions.sethome
          Creative:
            permissions:
            - -factions.claim
            - -factions.autoclaim
            - -factions.sethome
    
     
  14. Offline

    wilsondc15

    thank you but i was asking for example, i installed the plugin factions but i only want it to work in my pvp world, no other worlds
     
  15. Offline

    recon88

    Code:
        worlds:
          PvPWorld:
            permissions:
            - factions.claim
            - factions.autoclaim
            - factions.sethome
          Normalworld:
            permissions:
            - -factions.*
    That should work and disable the factions stuff on "Normalworld"
     
  16. Offline

    Royalgamer06

    make a group for only your pvp world. e.g. Fighter
     
  17. Offline

    wilsondc15

    hmm that would work, but what about plugins that keep the sun in one spot the whole day, like plugins that change mechanics or physics how could they work in only 1 world
     
  18. Offline

    recon88

    Plugins like that should have a per-world config ! Otherwise they are useless.
     
  19. Offline

    ಠ_ಠ

    Do the same as the - -Factions* only with the other plugin -.- it's not complicated
     

Share This Page