1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Announcement Enforcement of Rule C2a (fallback prefix)

Discussion in 'General discussion' started by SOFe, Nov 23, 2018.

  1. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    In case you aren't already aware, we have recently reorganized the plugin submission rules of Poggit. This document replaces PQRS 1.1 and some scattered rules written on the Poggit site.

    Today, I gave some attention to the rule C2a (originally in Section 2.(A) in PQRS 1.1) and found that about 20 updated plugins are violating this rule. Rule C2a states that:
    To summarize: If you use $this->getServer()->getCommandMap()->register() (or registerAll()), the first prameter that you pass into the function should be your plugin name, not your command name. There are some plugins that put their plugin short name (e.g. ScoreboardsPE put "scoreboard"), and some plugins simply used the command name (e.g. PiggyCrates put "key" for the /key command), and this is wrong.

    The fallbackPrefix parameter was added to tackle the problem of plugins with the same command name. For example, both PiggyCrates and MysteryCrates have the command /key, and if they are both used on the same server (although unlikely), usrs should be able to execute them by specifying the plugin name, e.g. /mysterycrates:key and /piggycrates:key. However, currently, both plugins are using "key" as the fallback prefix, which defeats the point of adding it (because both commands are /key:key when fully qualified, and it is still not possible to distinguish them).

    Originally, I wanted to reject all plugins that do this, but I realized too many plugins would be affected by this. As this is a non-critical issue but affects the long-term usage of plugins, developers are given a grace period of 28 days to resolve this issue. If the plugins have still not updated their fallback prefix then, the plugins will be rejected (including all updates and the original submission).

    Feel free to reply below if you have questions or comments.
     
  2. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Should we use the exact plugin name, the lowercase name or is either OK?
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    it doesn't matter, because PocketMine checks it case-insensitively.
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    so the fallback prefix should be registered as "PluginName:Command"?
     
  5. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Just "PluginName", the command name is set in the command.
     
    SOFe and Thunder33345 like this.
  6. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    You mistyped users. Also, I did not understand the part with the command being the plugin name. I mean, how to prevent the plugin name being registered as a command using this way for registering a command?
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    I think you misunderstood the whole thing. Fallback prefix is simply an extra identifier before the command name that can be used as an alias when there are two commands with the same name.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.