[ADMN/GEN] WorldModes 2.0 - world-specific game modes, player command, and inventory perms [1317]

Discussion in 'Inactive/Unsupported Plugins' started by sunkid, Sep 16, 2011.

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

    sunkid

    WorldModes

    All updates and project support is now handled on our DevBukkit site!
     
    natinusala and efstajas like this.
  2. Offline

    GravelSocks

    Here is an error I see when players log in. I will try the new version and see if that fixes it.

    Code:
    15:10:08 [SEVERE] Could not pass event PLAYER_GAME_MODE_CHANGE to WorldModes
    java.lang.NullPointerException
            at com.iminurnetz.bukkit.plugin.worldmodes.PersistedInventory.revertInventory(PersistedInventory.java:77)
            at com.iminurnetz.bukkit.plugin.worldmodes.GameModeChangePlayerListener.restoreInventory(GameModeChangePlayerListener.java:118)
            at com.iminurnetz.bukkit.plugin.worldmodes.GameModeChangePlayerListener.onPlayerGameModeChange(GameModeChangePlayerListener.java:60)
            at org.bukkit.plugin.java.JavaPluginLoader$28.execute(JavaPluginLoader.java:433)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
            at org.bukkit.craftbukkit.entity.CraftPlayer.setGameMode(CraftPlayer.java:463)
            at me.k900.plugins.tgm.Utils.setGameMode(Utils.java:27)
            at me.k900.plugins.tgm.Utils.swapGameMode(Utils.java:39)
            at me.k900.plugins.tgm.Command.onCommand(Command.java:80)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:358)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
    OK - I had worldmodes.creative: true and worldmodes.survival: true under my world definition so that I could toggle them without retyping. I changed it to just worldmodes.*: true and I don't see the problem. Creative/Survival should not be mutually exclusive, but rather act as flags. Also, I still suggest making the other change I mentioned previously.

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

    Rwembee

    sunkid likes this.
  4. Offline

    KaLul

    i cant take away someoney creative mode? iam op and admon. iam the owner. and he is member and only has those permisions:
    - worldmodes.keep-inventory
    - worldmodes.autoset.creative
    - worldmodes.autoset.survival
     
  5. Offline

    sunkid

    The plugin works just fine with PermissionsEx. I posted the incorrect set-up for your permissions.yml file (sorry, I am not an expert in this plugin). It should be as follows:

    Code:
    groups:
        default:
            default: true
            permissions:
            worlds:
                world:
                    permissions:
                    - worldmodes.survival
                    - -worldmodes.creative
                flatworld:
                    permissions:
                    - -worldmodes.survival
                    - worldmodes.creative
    
    Note that I had omitted the additional permissions node for each world.

    You can only set someone to the modes allowed by your permission configuration. In other words, if the world that player is in does not allow survival mode, you cannot change that player to survival mode.

    Thank you for reporting this! It turns out that this was an error with reverting a player's armor and that it had nothing to do with your permission configurations. I have fixed the problem and I have also implemented your suggestion to use 'worldmodes.mode.*' etc. Please let me know if this addresses your issue.

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

    RTRD

    @sunkid Can you add world specific gamemode? Like one world has Creative and one Survival?
     
  7. Offline

    sunkid

    That's what this plugin does :D! Just assign the permissions 'worldmodes.mode.survival' or 'worldmodes.mode.creative' to the worlds you want to be in survival or creative mode respectively.
     
  8. Offline

    RTRD

    How can i set permissions per world? :/
     
  9. Offline

    sunkid

    That depends on which permission system you are using! WorldModes supports bukkit's permissions, Permissions, GroupManager, and PermissionsEx.
     
  10. Offline

    RTRD

    I am using PermBukkit...
     
  11. Offline

    sunkid

    Use something like this:

    Code:
    groups:
        default:
            permissions:
                ...
            worlds:
                world:
                    worldmodes.mode.creative: false
                    worldmodes.mode.survival: true
                flatworld:
                    worldmodes.mode.creative: true
                    worldmodes.mode.survival: false
    ...
    
     
  12. Offline

    RTRD

    Thanks! :D
     
  13. Offline

    GravelSocks

    @sunkid - great - I'll install and check out the new version when some players are around. Thx.

    It really seemed like there was something screwy with the permissions acting in a mutually exclusive way when I had them individually called out and set as true/true, etc. Sorry to lead you astray.

    Thanks for adding the mode node! Keeps getting better and better! :D
     
  14. Offline

    DaNksta

    The post was a little confusing on exactly what permissions are needed, this helped clarify it for me.
    All I know for sure is when my users had something like:
    Code:
            - worldmodes.mode.*
            - worldmodes.set.self
    They would get the game mode change was cancelled.
    However, once I added the worldmodes.creative and worldmodes.survival permissions, it works fine!
    Not sure if the worldmodes.mode.* is needed, but I didn't care to find out. This is what I'm using and it works!;
    Code:
            - worldmodes.mode.*
            - worldmodes.creative
            - worldmodes.survival
            - worldmodes.set.self
     
  15. Offline

    sunkid

    What version are you using? worldmodes.survival and worldmodes.creative should not do anything anymore in 1.8.
     
  16. Offline

    DaNksta

    Just downloaded the most recent one and I'm running the most recent version of Bukkit. (Was 1240, now 1317)
     
  17. Offline

    mrciku

    My players are able to keep creative mode when they actually manage to find a way to kill themselves (/suicide or /killm) while in creative mode in the creative world.

    Maybe you could add a onPlayerRespawn listener also?
     
  18. Offline

    sunkid

    I am not able to replicate this problem. What multi-world plugin are you using? Is it set to enforce game modes as well?

    Thanks for pointing this out. I have addressed this in the latest version (2.0).

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

    mrciku

    My players are still able to stay in creative mode after falling into the void. Maybe the plugin did not move from the update folder properly, I'll get back to you.

    EDIT: The glitch still works. Also, could you add notification to the admin also that sets a player's gamemode? Instead of just telling it to the player.
     
  20. Offline

    doofmars

    I have a webserver wiht seperate worlds one for creative mode and one for survival mode, when i change the world the gamemode is switched correctly.
    But when i'm in the survival world (in survival mode) and log out an log on again the gamemode is set to creative instead to survival. Even in the game chat the message "your gamemode has been changed" appears.
    For Permission I use bPermissions 1.7.4, Bukkit Build b1317 and World Modes 2.0
    With Permissions 3.1.6 i have the same issue.

    Thanks for the great work!
     
  21. Offline

    Nick22

    What does it mean when it says "The game mode change was canceled"? i am using PEX and if i give someone the "worldmodes.set.self" permission they can not set their gamemode. it says "The gamemode change was cancelled" and it says the samething if i try to change their gamemode( i have the -'*' permission), but i can change my own gamemode, just not others. Please help!
     
  22. Offline

    Sk8Sanctified

    Switched to creative mode on a survival mode map just now and my inventory swapped to the creative world I have, which is 1 of 3. Main, Survival, Creative. Now even when I clear my inventory and go through any portal, this certain saved inventory shows up... This is no good, do you know what may have happened? All other inventories have been lost too. :(
     
  23. Offline

    GravelSocks

    Installed 2.0 - players were griping about chests and dispensers in creative mode. Now they are happy. Seems to work so far for mode switches and chest/dispenser patching. Thx!!
     
Thread Status:
Not open for further replies.

Share This Page