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


    It doesn't exist, but it doesn't matter. I can't put the real address as the package name anyway.
  2. Offline


    You should really sticky this for someone unfortunate enough to miss this.
  3. Offline


    I missed this >.< will check my plugins
  4. Offline


    Someone linked to java documentation as an argument for using a TLD. Let me clarify what that documentation actually says:

    "For small programs and casual development, a package can be unnamed (§7.4.2) or have a simple name, but if code is to be widely distributed, unique package names should be chosen (§7.7)."

    "The name of a package is not meant to imply where the package is stored within the Internet; for example, a package named edu.cmu.cs.bovik.cheese is not necessarily obtainable from Internet address cmu.edu or from cs.cmu.edu or from bovik.cs.cmu.edu. The suggested convention for generating unique package names is merely a way to piggyback a package naming convention on top of an existing, widely known unique name registry instead of having to create a separate registry for package names."

    Therefore, if you start with a TLD, you had better own the site or have permission from the person who does, or else you are following the guidelines too literally, rather than thinking about why they reccomend that you do.

    Everything would be so much easier if we could use org.bukkit.forums.user.username.*, since that would fit with the intention to provide a name that would never accidentally be used by someone else, while still following the TLD.* format. Additionally, since it is rather long, it could encourage users to get their own domain, in order to have a shorter name...
  5. Offline


  6. Offline


    Actually, .co.uk is already backwards. When you go to stupid.co.uk, it is first contacting uk (a DNS provider), then the sub-DNS co, and finally stupid. So it isn't backwards, it's actually the right way. Everybody should start using co.uk. :p
  7. Offline


    I got into the habbit of using
    Because of a tutorial I read on the bukkit wiki

    I'm a bit new to Java programming, does the namespaces matter that much?
  8. Offline


    Namespaces are not a concept specific to Java and have been around for a very, very long time. Yes, they're important.

    Be advised, starting today, official Bukkit builds will no longer allow {com,org,net).bukkit package naming and as such those plugins will no longer work with official builds past today.

    Edited, saw EvilSeph's comment below.
  9. Offline


    For someone relatively new to Java (just some tutorials on youtube before I started messing with plugins), it is *really* annoying that the beginners plugin guide (or whatever its called) suggests doing what this topic says not to do.
  10. Offline


    Due to the nature of our resources (official or not) pointing people in the wrong direction, I am going to postpone the sealing of the namespace to allow for an update of the wiki article, tutorials and/or as many plugins as possible.
  11. Offline


    Heh, I thought it was a bit strange the docs were telling us to use bukkit namespace - moved to my domain now :D
  12. Offline


    I myself agree with this idea; it's simple, to the point, prevents naming collisions, inconveniences plugin developers less and removes the whole confusion on the namespace naming, while avoiding problems for the bukkit core.

    If you want to isolate a namespace for bukkit itself, why not lock down the namespace org.bukkit.core.* instead?
  13. Offline


    I know some people are going to moan at me for this but...

    *braces for impact*

    You could always use: bukkitdev.forumusername.*
  14. Not really sure what you're going on about here... the namespace should be uk.co.* because it shows the order it's called. You described how all domains work.. and all domains are written backwards in the namespace...
    Therefore in namespace style www.stupid.co.uk => uk.co.stupid.www

    Unless I've got that horrible wrong...
  15. Offline


    it's horribly :p. But yeah, you pretty much just summed up my post :p
  16. Offline


    Good Idea - Will fix up MCDocs now :)
  17. Offline


    Could work, just as long as it's adhered to.
    Maybe something along the lines of bukkitdev.community.{username}.* - I see less chance of collisions this way, as it also allows for subnamespaces under bukkitdev -- in case "dev groups" start popping up, where multiple devs band together to release a set of plugins or plugin tools (and the group could replace the "community" bit).
  18. Offline


    I'm not a dev. but I LoL'ed


    I <3 your Bukkit though. Keep up the great work!
  19. Offline


    I used com.bukkit too :p Did change it some versions back though, will soon change it to a more normal one ;)
  20. Offline


    i just use mindless728.<Plugin Name> should work fine for me
  21. Offline

    Collin Chessell

    2011-02-22 23:12:56 [WARNING] Using the stupidly long constructor com.nijikokun.bukkit.Permissions.Permissions(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of Permissions to remove it! (Nothing is broken, we just like to keep code clean.)
    2011-02-22 23:12:56 [WARNING] Plugin 'Permissions' (ver 1.0) is registering events before it is enabled. It may be misbehaving and the author needs to fix this.
  22. Offline


  23. Offline


    Ok. So, why I cannot use com.djdch.bukkit.stackable ? Craftbukkit is rejecting my plugin in cause of that. This is what I use from the beginning, and from what I see, I was right to do that. But, now ... ?!?

    See: http://forums.bukkit.org/threads/discussion-oops-i-broke-your-plugins.961/page-3#post-88822
  24. Offline

    Binder News

    I am using org.omnimaga.user.BinderNews.<plugin>
    No, I don't own the Omni hostname, but that's why I'm using the .user.BinderNews part.
    Anyone think I need to change that?
  25. Offline


    Nah it's cool.
  26. Offline


    I'm guessing it's a bad regexp. Should be only denying something like the regexp "[0-9a-zA-Z]\.bukkit", but it would seem it's rejecting "*.bukkit", which also blocks anything from using "bukkit" as a subnamespace of a legitimate namespace.
  27. Offline


    I believe every single plugin should be org.bukkit.username.pluginname. The plugins are made for Bukkit and they have homepages in bukkit.org after all. Having custom domains is just confusing.
  28. Offline


    And then there is a username “command” or “entity” ;)

  29. Offline


    That's what I thought.
  30. Offline


Thread Status:
Not open for further replies.

Share This Page