[UNSUPPORTED][ADMN] HotSwap: Enable, Disable, Reload, and Load Plugins On-the-Fly

Discussion in 'Inactive/Unsupported Plugins' started by Zenexer, Jan 18, 2011.

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

    Zenexer

    You'll want to use GroupUsers with this one.

    Commands
    • /plugin load PLUGIN: loads the Java archive for PLUGIN from the plugins directory and enables it. Relative paths are accepted.
    • /plugin list: lists all loaded plugins, both enabled and disabled.
    • /plugin enable PLUGIN: enables already-loaded PLUGIN. Does nothing if PLUGIN is already enabled.
    • /plugin disable PLUGIN: disables already-loaded PLUGIN. Does nothing if PLUGIN is already disabled.
    • /plugin reload PLUGIN: disables, loads, and enables PLUGIN, though not necessarily in that order. Theoretically, disable could run after enable, but that would be unlikely/impossible in most/all JVMs.

    Download from Earth2Me or get the source code.
     
  2. Offline

    RustyDagger

    I dont want /need groupusers (cause its Fucked) could you make it so only ops can use the commands please (read ops.txt) i higly doubt any server owner would have a player that is not an op modifying plugins....
     
  3. Offline

    blaatz0r

    This plugin doesn't reload the jar files? That would be useful for developing plugins :)
     
  4. /plugin list (or any other /plugin) kills my client with
    Code:
    java.lang.StringIndexOutOfBoundsException: String index out of range: 72
        at java.lang.String.charAt(Unknown Source)
        at nh.a(SourceFile:152)
        at nh.a(SourceFile:119)
        at pe.a(pe.java:196)
        at ll.b(SourceFile:369)
        at net.minecraft.client.Minecraft.run(SourceFile:705)
        at java.lang.Thread.run(Unknown Source)
    
    Unfortunately I don't know how to determine the bukkit build number. :(
    I grabbed it about half an hour ago, in case that helps.
     
  5. Offline

    lonelydime

    /plugin list crashes my client


    Code:
          Minecraft has crashed!
          ----------------------
    
    Minecraft has stopped running because it encountered a problem.
    
    If you wish to report this, please copy this entire text and email it to [email protected].
    Please include a description of what you did when the error occured.
    
    
    
    --- BEGIN ERROR REPORT a1dce528 --------
    Generated 1/20/11 7:35 PM
    
    Minecraft: Minecraft Beta 1.2_01
    OS: Mac OS X (i386) version 10.6.6
    Java: 1.6.0_22, Apple Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Apple Inc.
    LWJGL: 2.4.2
    OpenGL: NVIDIA GeForce 9600M GT OpenGL Engine version 2.1 NVIDIA-1.6.26, NVIDIA Corporation
    
    java.lang.StringIndexOutOfBoundsException: String index out of range: 70
        at java.lang.String.charAt(String.java:686)
        at nh.a(SourceFile:152)
        at nh.a(SourceFile:119)
        at pe.a(SourceFile:238)
        at ll.b(SourceFile:369)
        at net.minecraft.client.Minecraft.run(SourceFile:705)
        at java.lang.Thread.run(Thread.java:680)
    --- END ERROR REPORT cea4be0b ----------
    
     
  6. Offline

    4am

    Unfortunately, this is a Java limitation. Once ClassLoader.addURL is called on a file, the JVM keeps it open until it exits. There are packages that enable Hotswaping, but they are a bit complex and some are very expensive. Doesn't really fit the Bukkit project ;-)
     
  7. Offline

    Zenexer

    @4am pretty much said it all.

    The plugin now tests with isOp() before granting permission to use the commands.
     
  8. Offline

    Huene

    If I could make a request, could you make the plugin parameter case insensitive?
     
  9. Offline

    IkithME

    I suggest using Niji's Permission plugin to delegate but for now isOp will do.
     
  10. Offline

    Yogoda

    Same, /plugin list crash my client. Maybe a problem with the color codes ? I know colors codes with no text after crash the client.

    Also sometimes when I /plugin enable or /plugin disable I get the plugin list instead. How is that possible ?
     
  11. Offline

    KiloWhiskey

    Seem that with CB106+ if you 'plugin list' or try to '/plugin enable' a plugin that you haven't loaded it will kill the client. Have also had a crash on '/plugin enable' that I thought was case sensitivity but I'm not certain.
     
  12. Offline

    Scizzr

    Code:
          Minecraft has crashed!
          ----------------------
    
    Minecraft has stopped running because it encountered a problem.
    
    If you wish to report this, please copy this entire text and email it to [email protected].
    Please include a description of what you did when the error occured.
    
    
    
    --- BEGIN ERROR REPORT a1dce528 --------
    Generated 1/21/11 1:19 PM
    
    Minecraft: Minecraft Beta 1.2_01
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_23, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon 3000 Graphics   version 3.3.9836 Compatibility Profile Context, ATI Technologies Inc.
    
    java.lang.StringIndexOutOfBoundsException: String index out of range: 69
        at java.lang.String.charAt(Unknown Source)
        at nh.a(SourceFile:152)
        at nh.a(SourceFile:119)
        at pe.a(SourceFile:238)
        at ll.b(SourceFile:369)
        at net.minecraft.client.Minecraft.run(SourceFile:705)
        at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT d3b3a22d ----------
    Spitting out too much information in one or more lines of output when using /plugin list and crashed my client...

    I noticed this using the WarpGate plugin and had to rename one of the gates to a shorter name to circumvent this error. Unfortunately, I cannot rename the plugins.

    You should remember that every color code that doesn't actually appear still counts as 2 characters ( ยง# ) so the Notch limit could easily be reached with coloring + the original text.
     
  13. Offline

    bogboom

    This needs permissions support.
     
  14. Offline

    fffizzz

    I second this notion. Support is real easy to add, much better fine grained control than GroupUsers as well.
     
  15. Offline

    ZeroPlayerXIII

    How can I install it ?
     
  16. Offline

    MatCat

    IS there any Permissions support? If not please add, thanks!
     
  17. Offline

    MonsieurApple

    I, er, third it.
     
  18. Offline

    IncendiaDrakon

    I'd use this plugin, but it either needs Permissions support or itss own permission file.
     
  19. Offline

    Nathan C

    Same is happening to me now.
     
  20. Offline

    talbot

    this plugin suddenly stopped working for me today, i updated to the latest version of it, and craftbukkit yesterday the 23rd and now it doesn't work. i'm not crashing, just nothing happens.
     
  21. Offline

    l5p4ngl312

    All of the commands crash my client. I'm also not smart enough to understand what 4am said. Was there a solution somewhere in there?
     
  22. Offline

    Oh no

    Does this support permissions by any chance?
     
  23. Offline

    GEN3RIC

    Yep, updated CB to a recent build and this plugin keeps crashing my client when I use plugin list. Most of my place burned down because my fire-preventing plugin won't auto-load and I couldn't get it running until I FTP'd in to look at the plugin's name. Ouch.
     
  24. Offline

    McAndze

    I forked it, and added Permissions support.
    Should work, though I haven't tested it yet.

    @Zenexer - If you want the source, I'll PM it to you. You probably won't need it, it's only very few lines of code.
    I didn't include the source in the zip, as that would be quite useless for the most.
     

    Attached Files:

    cembry90 likes this.
  25. Offline

    Oh no

    so we cant seem to get the plugin to cooperate with permissions...or load the plugin for the matter is there anything special we need to do?
     
  26. Offline

    mmerner

    sorry, didn't work with Permissions.

    craftbukiit 156?
    ubuntu 10.10

    Permissions 1.9
    General 2.0
     
  27. Offline

    jimmydorry

    And only an idiot runs around with fire in his wooden house. =P
     
  28. Offline

    GEN3RIC

    Naturally there isn't any fire in the tree house. A griefer stopped by the server when nobody was around and none of my anti-griefing plugins were running (for some reason, most plugins are disabled by default. I didn't know they weren't enabled because plugin list is broken). He carried a bucket of lava from 30 blocks below the surface and dumped it and then left at some point. It's always a worry of mine....
     
  29. Offline

    Scizzr

    Very nice. Good job on the Permissions support.

    I'm loving this plugin. Even the plugins that don't support Permissions can be semi-controlled by just disabling them when you're not using them (Magic Carpet, Flashlight, etc...)
     
  30. Offline

    McAndze

    Well, it doesn't work with the newest CraftBukkit.. Weird.
    I can't even get the original HotSwap to work with that.
    I'll take a look at it. Won't promise anything though.

    EDIT: I seem to have fixed it. Kind of. It works.. except that you crash when you type in a command. As far as I can see, this is related to Bukkit, not the plugin. I'll do a bit of research, to see if it's just me screwing up.

    EDIT 2: Fixed! But after all the debugging, I managed to make the code kind of primitive.. So consider this a temporary solution, until Zenexer has updated to Permissions, and the Command format!:D

    Oh, you should probably use the newest(Or one of the newest) CraftBukkit versions, since it requires the new Command format.

    EDIT 3: It doesn't actually disable the plugins. I don't know why, since I haven't touched the enable/disable/reload part of the plugin. I'll take a look at it though, but I'm not gonna waste more time than necessary.

    EDIT 4: A lot of edits <.< Well, I took a look at his code, and I couldn't find anything that seemed wrong. I think this part is bugged in the Bukkit code.
    So this plugin is virtually unusable at the moment, except that it can /plugin list - plugins.

    :(
     

    Attached Files:

    DigidragonZX likes this.
  31. Offline

    Scizzr

    'Twas working perfectly on #164, so IDK what happened. I'm sticking with #164 for now.
     
Thread Status:
Not open for further replies.

Share This Page