How do I create a folder of jar's?

Discussion in 'Plugin Development' started by MCxJB, Mar 31, 2012.

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

    MCxJB

    Hey all,

    I was wondering something. How can I get all the plugins on my server into one folder that can be placed into the plugins folder. Like a .jar file or something.
    If thats not possible how can I rename the plugins so that they say [ServerName] Essentials (For Example) when a user types /plugins.
    I think the first idea is better as I would only need one file to drag into the plugins if I have more than one server or there has been an update with Bukkit and Minecraft.

    Thanks,
    Mark
     
  2. why you need it? whats the point of doing verry complex thing, if you dont give an target for us, why?
     
  3. Offline

    MCxJB

    Hey,

    I was not sure it was so complex, I taught it was as easy as dragging them into a file. It would be easier. It does not need to be done.
    So you know how you can change the name of a plugin so that when someone types /plugin it shows as something else.

    Thanks,
    Mark
     
  4. for that, you need to edit eachs plugins name
     
  5. Offline

    MCxJB

    Is that within the FTP or is it within the Jar?
     
  6. its whitin the jar, and some jars have an build in verify code, so you also need to delete that, and you also need to redo it at every plugin update, verry annoying task
     
  7. Offline

    MCxJB

    Yes your right seems that it may make be throw my computer against the wall :p. Thanks anyway I appreciate the reply :D
     
  8. Offline

    Technius

    No, don't give up! Use reflections.

    Code:java
    1. PluginManager pm = //plugin manager
    2. for(Plugin p:pm.getPlugins())
    3. {
    4. try
    5. {
    6. Field f = PluginDescriptionFile.class.getDeclaredField("name");
    7. f.setAccessible(true);
    8. f.set(p.getDescription(), "Name");
    9. }
    10. catch(Exception e)
    11. {
    12. e.printStackTrace();
    13. }
    14.  
    15. }


    It's ugly and expensive, but you'll get your results.
     
  9. can cause problems whit plugins that need others to work, like plugins that need vault, or others, and you need to run this code before anny code of other plugins run, if you want that the chat messages of it are also oke
     
  10. Offline

    Technius

    Actually, the plugin manager binds a lookup name to each plugin. PluginManager.getPlugin(String plugin) returns a plugin based on that lookup name. Changing the name of the plugin in the description file won't really do anything.
     
Thread Status:
Not open for further replies.

Share This Page