Offline gamemode changer

Discussion in 'Archived: Plugin Requests' started by xpopy, Sep 30, 2012.

  1. Offline


    Plugin category: Admin

    Suggested name: ProMode

    What I want: An easy way to change gamemode of yourself, other players AND offline players.

    Ideas for commands:
    /gm [0, 1 or 2] - sets gamemode on self.
    Message on command: Your gamemode have been changed into [gamemode]

    /gm [playername] - gets the current gamemode on a player.
    Message on command: [Playername]'s gamemode is [gamemode]

    /gm [playername] [0, 1 or 2] - sets the given players gamemode to 0, 1 or 2.
    Message on command: [playername]'s gamemode have been changed to [gamemode]
    Message for the other player: Your gamemode have been changed to [gamemode]

    Ideas for permissions:
    promode.set - For setting your own gamemode
    promode.get - For getting someones gamemode
    promode.setother - For setting others gamemode

    When I'd like it by: As soon as possible.

    Additional note: I know there is loads of gamemode changers out there, but i've never found one for offline players, which is something I really want. So please? :D
  2. Offline


    I'll try...

    To trudniejsze niż myślałem...
  3. Offline


    xpopy likes this.
  4. Offline


    Why is there a "message for the other player" if this is for offline mode players? :D
  5. Offline


    It's for both, so if the player is online it would msg them in that format, and if a player logs in, I'm guessing he would want that for the player who was changed while offline.
  6. Offline


    Wow, Thank you so very much!
    So far it works great :D

    Only "error" I've found so far is, when changing a gamemode, it gives two messages, first the "Your gamemode have been changed into [gamemode]", which should display, but then also another message saying "Your gamemode has been changed".
    I would guess that second one is a vanilla minecraft message. It would be really nice if you could fix it and remove the second message, but is totally not needed if you dont want to :)
    This however isnt important at all, its still working perfectly. :D

    Thx again ;D
  7. Offline


    As far as I know, the "You gamemode has been changed." message is client-sided. So I don't think I can stop that from showing up.
  8. Offline


    Oh, I did not know that ^^

    Well, thanks anyway :)
  9. Offline


    Hmm, seems like an update broke a feature if the plugin.
    When doing "/gm [name]" to check an offline players gamemode, i get this error message:

    2013-01-13 13:06:40 [WARNING] Unexpected exception while parsing console command "gm xpopy"
    org.bukkit.command.CommandException: Unhandled exception executing command 'gm' in plugin ProMode v1.0.0
        at org.bukkit.command.PluginCommand.execute(
        at org.bukkit.command.SimpleCommandMap.dispatch(
        at org.bukkit.craftbukkit.v1_4_6.CraftServer.dispatchCommand(
        at org.bukkit.craftbukkit.v1_4_6.CraftServer.dispatchServerCommand(
        at net.minecraft.server.v1_4_6.DedicatedServer.r(
        at net.minecraft.server.v1_4_6.MinecraftServer.q(
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/NBTBase
        at com.github.one4me.ProMode.ProMode.onCommand(
        at org.bukkit.command.PluginCommand.execute(
        ... 8 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.server.NBTBase
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 10 more

    EDIT: Same when setting an offline players gamemode. Seems like the offline is gone for now.. :/
  10. Offline


    looks like plugin needs to be updated to 1.4.6.
  11. Offline


    Yeah, unfortunately I am not a programmer. So if anyone would update it for me, I would be extremely happy :)
  12. Offline


    Come on, I really need this. Anybody? :(
  13. Offline


    Looking at VanillaExtracts code. he is using a "Special" way of getting offline players. since bukkits sucks. hes grabbing the player.yml in the world file and changing values in that. But it needs nbttags. And now in bukkit 1.4 NBTTags have to be manually updated every bukkit update.(Im pretty sure). I got no experience with nbt or how to manually update them to work. So.. yeah
  14. Offline


    With other words, it is very unlikely that it will be updated. And if it would be, it would break on next bukkit update?
    That sucks D:

    Is there any other way of doing it, without having to manually update it every time? And how come bukkits way sucks...?
  15. Offline


    Or you could store the names into a config


    stuntguy3000: creative

    When i login it sets me to creative
  16. Offline


    Yeah, I though that might have been possible aswell. But still, I am no programmer, so I don't know how to :/
  17. Offline


    I just used nbt explorer and searched through all my users for those with gamemode and manually changed it in nbt and uploaded the player files again :D
  18. Offline


    Lol. Well I prefer having a way to do it ingame. I am a bit lazy sometimes... >_>

    Come on.. Second time somebody says he will do it, but then just remoces his post an hour afterwards.. -.-

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 29, 2016
  19. Offline


    I will work on it. But you will have to wait until tomorrow. Got about 40% of the plugin done.
  20. Offline


    Oh, cool :D
    I don't care waiting another day, the plugin has been broken for over a month already, haha...
  21. Offline


    Seems like McAvarice got banned for copying others code... Anyone else up for updating this? :s
  22. Offline


    Hello, xpopy
    PwnCraft PvP.png
    Download: Here
    Source Code: Here
    - pwnmode.setself
    - pwnmode.get
    - pwnmode.setother
    - /gm <0-2> (Set your gamemode)
    - /gm <player> (Get a player's current gamemode)
    - /gm <player> <0-2> (Set a player's gamemode)
  23. Offline


    Ah, finally! Thank you so much :)

    However, it seems like console commands are not working, and it doesn't keep your gamemode if you relog.
    (Btw, its 0-2, not 1-3 xD )

Share This Page