1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Feature It's time to finish the stupid version based package renaming

Discussion in 'Bugs & Feature Requests' started by gyurix, May 27, 2015.

?

Is this a good feature request? For boosting server performance and making plugin development easier

  1. Yes, it is. :-)

  2. No it isn't :-( ► Why? Please describe your oppinion in a comment!

Results are only viewable after voting.
  1. Developers, as you know, Spigot uses version based packagenames, like net.minecraft.server.<version> package for modified vanilla server classes and org.bukkit.craftbukkit.<version> package for the CraftBukkit staff.

    The problem is, that plugins, which are using classes from these packages will break on every Spigot version update.

    Plugin devs usually solves this problem using reflection or making classes for every version.

    Both of these solutions are absolutely inefficient, because they are decreasing the servers performance, increases the RAM usage and causes unneccessary extra work for the plugin developers.

    So my idea will be a very very simple thing: Spigot Team, please don't use the server version number in these package names!
     
  2. Spigot has nothing to say about it, it's Mojang that does it, and I heard there were good reasons for it.
     
  3. It's nothing to do with Spigot, it's mojangs code
     
  4. Minecraft server uses the default package for their class files. I have checked it now, so this isn't a reason...
    If you don't believe it, try to decompile the original vanilla server jar: https://s3.amazonaws.com/Minecraft.Download/versions/1.8.6/minecraft_server.1.8.6.jar
     
  5. @gyurix Yes but when Mojang change how the code works then Spigot have to update to coincide with that
     
  6. Guess why it was introduced? Plugins SHOULD break on each nms update, so authors MUST verify the code, add the things for the new version etc. Thats a security: Imagine you call WorldServer#fgd() which saves the world in version 1.8, but in version 1.8.2 it deletes the whole world... Ooops.

    Using reflection can (but doesn't need to) cause some inefficiencies, but mostly they aren't notable. However, the security is then non-existent. Using different classes is always better, causes zero inefficiencies and is secure for the server owner.

    The work for the plugin developers is measured in minutes, the RAM usage won't increase and if reflection isn't used the server performance isn't affected. If reflection is used, server performance is likely not affected.

    It was introduced for a reason and I see no valid point to change it.

    No mojang has nothing to do with it. All there stuff is in net.minecraft.server.*, but spigot / craftbukkit added the version named package.

    Yes, but spigot is still the cause of this. See above.
     
    • Agree Agree x 1
    • Winner Winner x 1
    • Informative Informative x 1
  7. Doesn't JVM loads all the classes in a jar file? I said the more RAM usage because of the several classes for the same thing...
     
  8. No it doesn't, and if it would, you wouldn't notice... It's like saying I don't use methods, I only have one, because calling a method increases cpu usage...
     
    • Agree Agree x 3
  9. If it doesn't, then it's ok, then the problem is only that devs need to copy the same code to different classes...
    But what about the server version change then? Server admins always need to wait some days, until the plugin dev releases the newest plugin version, which supports the latest server version :-(
    And what about discontinued plugins? They could work, but they won't if they aren't using reflections.

    Thanks for this link, let me read it :)