Filled PerWorldCommands

Discussion in 'Plugin Requests' started by Xp10d3, Feb 23, 2020.

  1. Offline

    Xp10d3

    Hello,
    Since it seems that there are no PerWorldCommands plugins out there except for one (which I've tried and ended up with many bugs and issues that haven't been patched) I've come here to ask if someone can make this plugin.

    Plugin Category: PerWorld plugins
    Minecraft Version: 1.15.2
    Suggested Name: I don't really care but PerWorldCommands I guess (although that's already taken)
    What I want: For certain commands to be disabled in certain worlds that are specified in the config. Here is an example of what the config could look like:
    Code:
    per:
      commands:
        factions:
          worlds-allowed:
          - world
          - Spawn
          - Survival
          - Survival_the_nether
          - Survival_the_end
        compass:
          worlds-allowed:
          - New_Corelia
          - world
    
    This means that the command /factions is only allowed in the worlds world, Spawn, Survival, Survival_the_nether, and Survival_the_end. If you were to try and do /factions in, lets say, the world New_Corelia it would give you an error message saying you can't do that command in that world. Same with /compass. It is only allowed in the worlds New_Corelia and world and if you were to try and do the command in the world Survival it would give you an error message. Same for any world that is not specified.
    Ideas for Commands: I don't really need any but if you want to add a command that allows you to add a command in the config in-game, that's fine. Here are some ideas:

    /pwc add <command>
    Description: This adds a command to the config. It just adds the section "help" to the config.
    Example: Player does /pwc add help. The config now looks like this:
    Code:
    per:
      commands:
        factions:
          worlds-allowed:
          - world
          - Spawn
          - Survival
          - Survival_the_nether
          - Survival_the_end
        compass:
          worlds-allowed:
          - New_Corelia
          - world
        help:
    
    /pwc modify <command>
    Description: Selects the command help. Only works if the command "help" is in the config. If you were to try and select a command that doesn't exist in the config it won't work.
    Example: Player does /pwc modify help. The command "help" is already in the config. A message is sent saying that the command "help" is selected. But if player does /pwc modify bukkit and the command "bukkit" is not in the config, it will say that the command does not exist in the config.

    /pwc world add <world_name>
    Descripition: Adds the world to the command. Only works if the command is selected using /pwc modify <command>. Once it is selected, you can do /pwc add <world_name> to add the world to the section.
    Example: Player does /pwc modify help. Then does /pwc world add Spawn. Config now looks like this:
    Code:
    per:
      commands:
        factions:
          worlds-allowed:
          - world
          - Spawn
          - Survival
          - Survival_the_nether
          - Survival_the_end
        compass:
          worlds-allowed:
          - New_Corelia
          - world
        help:
          worlds-allowed:
          - Spawn
    
    Ideas for Permissions: None unless you are doing the commands. If so...
    pwc.use: Allows permission to use the commands.
    When I'd Like it by: As soon as possible.
     
  2. Offline

    Xp10d3

  3. Offline

    EpicGodMC

    Shoul'nt be too hard ill see what i can do for you

    Hey @Xp10d3 i think this will fit your needs:

    i have tweaked a few things from your request as i find it unnecessary to add a selection command
    when i can just add an extra arg to a different command

    Commands are:

    - "/pwc addcmd <cmd>"
    - "/pwc addWorld <cmd> <world>"
    - "/pwc reload"

    Permission is "pwc.use" as requested for all commands

    plugin features an option in config called "onlyCheckCmdName" this means if it is on true it will only check for the cmdname E.G if player types "/compass give 1", plugin will check for "compass" if on false it check for "compass give 1"

    Made and tested on 1.15.2 not guarenteed to support other versions.
    Plugin has no dependencies

    SourceCode
    Download

    EDIT: Download | fixed an issue

    hope this fits your needs ;)
     
    Last edited: Feb 25, 2020
    Xp10d3 likes this.
  4. Offline

    Xp10d3

    Thank you so much!!! I'll test it when I get home from skool :)
    EDIT: Works perfectly! Tysm :D :D :D
     
    Last edited: Feb 27, 2020
  5. Offline

    Xp10d3

    Sorry to bother you again it seems to that onlyCheckCmdName isn't working. Any sub commands of compass/lands/etc. don't seem to be checked. When my config looks like this:
    Code:
      land:
        onlyCheckCmdName: true
        allowedWorlds:
        - Survival
        - Survival_nether
        - Survival_end
    
    I can do any subcommand of /land like /land help, /land create, etc. Thanks!
     
  6. Offline

    EpicGodMC

    Hey im sorry to hear that i will take a look at your issue, have you found any errors or did you change server version or anything of the sort?
     
  7. Offline

    Xp10d3

    It seems to be a recurring issue with both Bukkit but I recently changed to Paper. I resulted to using LuckPerms per-world permissions but some permissions don't seem to work with LuckPerms xD So:

    Q: Any errors?
    A: No. I don't seem to be getting any errors at all.

    Q: Did I change my server version?
    A: No. It is still on 1.15.2

    Q: Did you change anything else of the sort?
    A: Yes. I switched from Bukkit to Paper and installed LuckPerms and the plugin Lands.

    Thank you for replying so quickly!
     
  8. Offline

    EpicGodMC

    does this problem only occur with the lands commands?
     
  9. Offline

    Xp10d3

    No. Also Auction plugin as well and other such plugins.
     
  10. Offline

    EpicGodMC

    Hey @Xp10d3 sorry for being a bit inactive, i have been bussy this week.

    i think i have identified your issue and fixed it hopefully, let me know if issue still appears

    download
     
    Xp10d3 likes this.
  11. Offline

    Xp10d3

    All good :) Tysm I’ll try that out.


    Sent from my iPhone using Tapatalk
     

Share This Page