On namespaces - please do NOT use *.bukkit in your plugins.

Discussion in 'Plugin Development' started by EvilSeph, Feb 8, 2011.

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

    EvilSeph

    Been meaning to address this for a while now:
    We ask that people do NOT use the *.bukkit namespace unless you a) own the domain name, which you don't or b) are on the Bukkit team. Anything within that namespace should be officially from Bukkit itself. Nothing less, nothing more, as it can create confusion.

    The namespace you should be using is either:
    • tld.DOMAINYOUOWN.* - if you own the domain name OR
    • yourcountry.yourname.* - OR if it's taken
    • just use your reverse email address, so if that is: [email protected] use com.hotmail.megaawesome.<pluginname> .*
    Thank you for your cooperation.
     
  2. Offline

    feverdream

    What about plugins that already use it? DO we have an expected transition date?

    What about verification for ownership of namespaces, etc?
     
  3. Offline

    hash

    You should have an expected transition date of nearly a decade ago, since what EvilSeph just said is a polite reiteration of what's been a published java standard since very nearly the beginning of the language itself. :p
     
  4. Offline

    alexgeek

    How would you do .co.uk ? uk.co.alexgeek.plugin?
    backwards time!
     
    Reddeh likes this.
  5. Offline

    feverdream

    Thank you, Mr. Snert.

    I'm asking about a technical requirment, not a social one. Social requirements don't matter and cant limit what can be programed, technological ones can. One of the issues I was thinking about in regards to Fill and the rest to where the plugin stuff is going - as I feel I know more then I probably should - is that currently we have a problem with the fact that they have blindsided us and FORCED us to register commands we want to use in yaml that is hard coded within the plugin, that can not be edited in any way; and this creates HUGE problems as it greatty limits what people can do, and offers NO SOLUTION for people who want to either have a dynamicly configured command used in their plugin, or want to support allowing people to use the command from one plugin with another (multiple plugins supporting the /time command, for example). It also creates a SECURITY problem as commands can be high-jacked so forth as no namespace verification or plugin verification is being done.
     
  6. Offline

    Byteflux

    Exactly.
     
  7. Offline

    Redecouverte

    i will update my plugins when i release an update to them
     
  8. Offline

    mindless728

    the other option is to forgo the domain and just use the user name, i publish them with mindless728.plugin
     
  9. Offline

    mkaltner

    Might want to update the tutorial wiki, it specifically states to use "com.bukkit.<yourname>.<yourpluginname>" in step 3.3. I actually paused there and considered if this was a requirement of Bukkit or not and chose use my standard naming convention instead. Guess I made the right choice. :)

    http://wiki.bukkit.org/Programming_A_Plugin
     
  10. Offline

    lukegb

    Consider this post your one week's notice.

    As of 15/02/2011 the sealed option will be activated on the jar, locking out the following namespaces:
    • org.bukkit
    • net.bukkit
    • com.bukkit
     
  11. Offline

    feverdream



    Quoting for win. Glad I could help.
     
  12. Offline

    Redecouverte

    yeah!

    that's the reason i am/was using it
    --- merged: Feb 8, 2011 11:36 PM ---
    wait, you mean 15/02/2011 ? 08 would be in half a year
     
  13. Offline

    KaBob

    Yeah, thanks to the wiki I thought this was a requirement so I was really confused about what this change could possibly mean. This is a bit confusing for people who normally don't use languages like java.
     
  14. Offline

    Afforess

    +1 this. I had no idea as well, previously being a C++ guy.
     
  15. Offline

    ursa_arcadius

    So I am pretty new at programming. I am currently using the package com.bukkit.ursaarcadius.FindItem because that is how I was shown to do it. What should I change this to? And will changing this break anything?
     
  16. Offline

    darknesschaos

    seems ursaarcadius.finditem or com.ursaarcadius.finditem is perfectly fine.... now for me to go fix my plugins....
     
  17. Offline

    Tahg

    Personally I would use nick.plugin if you are not associated with any organization and do not have your own website. I would leave TLD's for those of you who actually have a domain on a TLD. That is just my opinion though and won't affect the validity of any plugin submission.
     
  18. Offline

    lukegb

    TLDs should only be used if you have a domain - though with the availability of the (free) co.cc, there's no real reason not to! ;)

    Sidenote: lukegb.co.cc would map to cc.co.lukegb
    So you might have cc.co.lukegb.emptyr.Maim (sic, and sic again) in cc/co/lukegb/emptyr/Maim.java

    Seemplez. (sic)
     
  19. Offline

    Dinnerbone Bukkit Team Member

    Actually, it's very bad practice to not start with a TLD. It doesn't matter if you own a domain or not, just form one similar to what you'd have if you did. For example if you lived in California, your name was uberman and your plugin was called uberplugin, you'd do:
    us.uberman.uberplugin

    http://java.sun.com/docs/books/jls/third_edition/html/packages.html
     
    xxyy98, Codiction and Aengo like this.
  20. Offline

    Grum Bukkit Team Member

    If you don't have a domain, just use your reverse email address, so if that is: [email protected] use cum.hotmale.megaawesome.<pluginname> .
     
    Pew446 and HON95 like this.
  21. Offline

    ursa_arcadius

    Why is it reverse?
     
  22. Offline

    xZise

    Because of the structure of a package/domain? For example “en.wikipedia.org.” means: Search for the DNS server for org. If he founds it, it asks this server for wikipedia and so on. In the packages it's like this: You selecting a subpool of a bigger pool and search then in this pool.

    For example the class “java.util.List”. At first in “java” are all general classes. In there you only select the utility classes and there only the List “class” (actually it's a interface).

    Fabian
     
    Ice_Sword likes this.
  23. Offline

    matejdro

    I'm using "com.matejdro.bukkit.jail" due to Plugin development guide that was posted here some time ago.

    Would simply "com.matejdro.jail" be fine?

    Or wait, should i use "com.gmail.matejdro.jail"????

    This is confusing. What do gmail have to do with bukkit?
     
  24. Offline

    Dinnerbone Bukkit Team Member

    com.matejdro.jail is fine.
     
  25. Offline

    xZise

    Why is “com.matejdro.bukkit.” not allowed? It is in matejdro namespace and therefore his decision? lukegb previously said, that “(com|org|net).bukkit” is not allowed any more. There is bukkit on the 2nd level. In matejdro case bukkit is on the 3rd level?

    Fabian
     
  26. Offline

    Dinnerbone Bukkit Team Member

    That's fine, it's on matejdro's domain and thus entirely up to him. I myself store bukkit related projects on com.dinnerbone.bukkit.*.

    First level = a TLD
    Second level = anything but bukkit :p
    Third-nth = anything
     
    DoggyCode™ and Europia79 like this.
  27. Offline

    xZise

    Thanks for the clarification.

    Fabian
     
  28. Offline

    phaed

    Should probably sticky this.
     
  29. Offline

    8e8

    I've been using com.eighty8.bukkit.pluginname, so I should be fine.
    EDIT: What the guy above me said.
     
  30. Offline

    Plague

    Umm, since eighty8.com does not even exist, you are not fine:
    But this is just a recommendation, so you are fine anyway :)
     
Thread Status:
Not open for further replies.

Share This Page