sunkid / WorldModes

A bukkit plugin to enforce world-specific game modes
2 stars 0 forks source link

The case of the perminate inventory. #2

Open Sk8Sanctified opened 12 years ago

Sk8Sanctified commented 12 years ago

Not sure weather this applies to Worldmode or MultiInv plugin, however I noticed the bug when I switched gamemodes to creative in a survival world the other day. What happened was I switched my modes and when I did, the inventory that was saved for the creative world also loaded with the command /gm sk8 1.. Then no matter if I killed myself or issued the command /clearinventory. This inventory would load after going through any portal. Today I installed the newest versions of both plugins, deleted all the inventory files and went to see if this would fix it. It did seem to fix the inventory from loading in every world no matter if you died or destroyed your inventory. Now the issue is, that certain saved inventory, loads everytime I go into the main world (which is also a survival world). Even if I die in that world or /clearinventory. Once I go through a portal back to that world it loads that old creative mode inventory from a few days ago... I even DELETED all the inventory files mind you before I tested the new updates of these plugins. Where in the world is this inventory coming from and why!?!?!? lol Thanks a bunch for being so patient with me. I just don't understand how this is possible anymore with a brand spanking new MultiInv. Any suggestions?

Sk8Sanctified commented 12 years ago

Alright I have redone a lot of my files and narrowed it down. It seems that people with the ability to change gamemodes if they do so in a world which is opposite of the mode they are switching to, it will also load the inventory which is save for that mode previously and erase the inventory you have. Also players that can /tp /home /spawn will carry over items on the rare occasion and the inventory is bugged out after that. As if there is some permanent inventory save somewhere.

This is exactly what I did. I went from my creative world with stuff in my inventory to the main world which is survival by using /spawn, My items carried over. Now I can empty my inventory in the main world. go back to creative and /spawn again and restore the inventory that I just emptied. Even if my inventory in creative world is empty before using /spawn

RustyDagger commented 12 years ago

if you ask me worldmodes just needs to stop touching the inventory and let multi inv do all the work. if you dont want to remove it from worldmodes just add a setting to turn it all off please. Multi inv was working fine at changing inv before installing this plugin.

Sk8Sanctified commented 12 years ago

Since 2.0 and world modes being able to restore inventory, multi inv now bugs out world modes and saves the restore or something and you will constantly get that same restore on a certain world. MultiInv hasn't been updated in a while though and is having some issues itself when people go through portals to certain worlds that they once died in. If they didn't respawn in that world after they died, there health gets saved at 0 so every time they enter they immediately die. What I did to solve these problems, switched over to WorldInventories to save inventory. It's doesn't have as much control of inventory being able to edit certain items and health in a yml like MultiInv, but it does the job, and does it well. It has been updated a bit more recently then MultiInv which may be why.

sunkid commented 12 years ago

@RustyDagger WorldModes already has a permission that will turn off inventory management: worldmodes.keep-inventory

sunkid commented 12 years ago

@Sk8Sanctified please pastie your permissions. Unless you have the worldmodes.keep-inventory permission, you should not be able to keep your items from a creative world. Note, that if you are using PermissionBukkit, there is an issue with player re-spawning in a survival world after death in a creative world. This is an issue with PermissionBukkit though.

RustyDagger commented 12 years ago

@sunkid well that is a stupid name for the node it sounds like it would still be forcing the player to keep what they had in creative.

a setting in the config to disable all inventory related events is what is needed.

sunkid commented 12 years ago

Sorry you don't like the name. It does what you want though and it lets players keep their inventory from creative worlds. Not sure which part you don't understand there!?

On Oct 19, 2011, at 6:50 PM, RustyDagger wrote:

@sunkid well that is a stupid name for the node it sounds like it would still be forcing the player to keep what they had in creative.

a setting in the config to disable all inventory related events is what is needed.

Reply to this email directly or view it on GitHub: https://github.com/sunkid/WorldModes/issues/2#issuecomment-2463688

RustyDagger commented 12 years ago

I dont want them to keep their inventory and i dont want this plugin to touch the inventory because it creates a large Dupe Glitch. I want all inventory Touching to be stopped by thins plugin NONE AT ALL NO copy no restore no nothing is it that hard to understand.

currently with out the permission node to keep inventory players can get items from the creative map any way by returning to the smp map and right clicking with any of the 9 hotbar slots it then returns the items from the creative inventory it fails it sucks. I want it turned off fully. uh time to find another plugin....

sunkid commented 12 years ago

Until you start paying me enough for support, you had better adjust your attitude, @RustyDagger. You are out of line and if you continue like this I will simply ignore you.

Two things: Upgrade to the latest version as you seem to be on 2.0 and add that permission for all players. With the worldmodes.keep-inventory WorldModes will not do any inventory management just as I stated twice above now.

On Oct 19, 2011, at 7:14 PM, RustyDagger wrote:

I dont want them to keep their inventory and i dont want this plugin to touch the inventory because it creates a large Dupe Glitch. I want all inventory Touching to be stopped by thins plugin NONE AT ALL NO copy no restore no nothing is it that hard to understand.

currently with out the permission node to keep inventory players can get items from the creative map any way by returning to the smp map and right clicking with any of the 9 hotbar slots it then returns the items from the creative inventory it fails it sucks. I want it turned off fully. uh time to find another plugin....

Reply to this email directly or view it on GitHub: https://github.com/sunkid/WorldModes/issues/2#issuecomment-2463845

Sk8Sanctified commented 12 years ago

PermissionsEX

groups:

Guest:
    default: true
    permissions:
    - modifyworld.chat
    - worldmodes.mode.*
    - essentials.rules
    - essentials.list
    - essentials.help
    options:
        rank: '1000'
    worlds:
        world:
            worldmodes.mode.creative: false
            worldmodes.mode.survival: true
        Creative:
            worldmodes.mode.creative: true
            worldmodes.mode.survival: false
        Survival:
            worldmodes.mode.creative: false
            worldmodes.mode.survival: true
        world_nether:
            worldmodes.mode.creative: false
            worldmodes.mode.survival: true
    prefix: '&3(&7Guest&3)&7'

Builder:
    default: false
    permissions:
    - modifyworld.*
    - modifyworld.chat
    - worldmodes.mode.*
    - worldmodes.drop
    - dirtpaths.*
    - essentials.spawn
    - essentials.home
    - essentials.sethome
    - essentials.back
    - essentials.back.ondeath
    - essentials.protect.entitytarget.bypass
    - essentials.afk
    - essentials.balance
    - essentials.clearinventory
    - essentials.depth
    - essentials.getpos
    - essentials.geoip.show
    - essentials.help
    - essentials.helpop
    - essentials.ignore
    - essentials.info
    - essentials.list
    - essentials.mail
    - essentials.mail.send
    - essentials.me
    - essentials.motd
    - essentials.msg
    - essentials.nick
    - essentials.pay
    - essentials.portal
    - essentials.protect
    - essentials.r
    - essentials.rules
    - essentials.seen
    - essentials.sell
    - essentials.suicide
    - essentials.worth
    - essentials.sethome.multiple
    options:
        rank: '900'
    worlds:
        world:
            worldmodes.mode.creative: false
            worldmodes.mode.survival: true
        Creative:
            worldmodes.mode.creative: true
            worldmodes.mode.survival: false
        Survival:
            worldmodes.mode.creative: false
            worldmodes.mode.survival: true
        world_nether:
            worldmodes.mode.creative: false
            worldmodes.mode.survival: true
    prefix: '&3(&eBuilder&3)&7'

Kindred: default: false inheritance:

Moderator:
    default: false
    inheritance:
    - Kindred
    permissions:
    - worldedit.generation.cylinder
    - worldedit.generation.cylinder
    - worldedit.generation.sphere
    - worldedit.generation.sphere
    - worldedit.generation.pyramid
    - worldedit.generation.pyramid
    - worldedit.tool.tree
    - essentials.tpa
    - essentials.tpaccept
    - essentials.tpahere
    - essentials.tpdeny
    - essentials.world
    - lytreehelper.generate.trees
    - lytreehelper.destroyall
    - nofloatingtrees.command.nftpurge
    - worldmodes.set.*
    - powertool
    - -modifyworld.mobtarget.*
    - nolagg.clear
    - essentials.sethome.multiple.staff
    options:
        rank: '100'
    prefix: '&3(&1Moderator&3)&7'

  Admin:
    default: false
    permissions:
    - gianttrees.*
    - gianttrees.customdangerous
    - gianttrees.custom
    - gianttrees.nolimit
    - gianttrees.reload
    - gianttrees.undoall
    - gianttrees.build
    - lytreehelper.generate.trees
    - lytreehelper.destroyall
    - lytreehelper.generate.forests
    - lytreehelper.generate.nursery
    - lytreehelper.db.blockaccess
    - lytreehelper.db.forestlist
    - lytreehelper.db.registerforest
    - lytreehelper.db.deleteforest
    - lytreehelper.db.regenerateforest
    - lagmeter.*
    - nofloatingtrees.command.nftpurge
    - essentials.sethome.multiple.unlimited
    - essentials.protect.entitytarget.bypass
    - '*'
    options:
        rank: '0'
    prefix: '&3(&4Admin&3)&7'

Those are my permissions above. The issue seems to be where inventory is restored when it doesn't need to be, happens occasionally during a command that teleports between worlds or simply going through a portal to change the world. It will save the previous world inv and then the next world you end up it. You will see the message your inventory has been restored and it will be from that previous world's inv. soooo if I add worldmodes.keep-inventory node to a the players, world modes will stop attempting to restore an inventory OR it will make it so all inventory is the same on each world...? As in, the player will put stuff in there inv from creative world then switch to survival world. Since they have the node they will keep that stuff? Because the way I understood that node works is that it ignores inventory adjustments, like separate saves. If I'm using a WorldInventories to save each worlds inventory separately, then giving the players this node will allow that plugin to do the work and worldmodes will step aside as far as inventory goes? Because if that node simply makes it so the inventory is not touch yet allows other plugins to override then that's perfect! Just what I need. If it will override the other plugin and make all inventory switches ignored then that's not so good.

I will find out right now I guess, I know you said "retain" your inventory on the Worldmodes bukkit page. btw my bad for opening and closing the issue down there twice, I had some problems with a comment and then kept hitting close comment instead of comment to top it off. lol

sunkid commented 12 years ago

What permissions plugin are you using?

As far as the keep-inventory permission: WorldModes will not do anything with the inventories of any player that has it.

On Oct 22, 2011, at 10:28 AM, Sk8Sanctified reply@reply.github.com wrote:

sorry bout the massive worldedit perm section, it's still in edit. lol

Reply to this email directly or view it on GitHub: https://github.com/sunkid/WorldModes/issues/2#issuecomment-2491835

Sk8Sanctified commented 12 years ago

PermissionsEX. I gave every player that command. Somehow someone still carried stuff over from creative when they did /spawn. It seems to happen out of the random and never to me now but one player says he can do it all the time. Super bugged and pretty annoying.

sunkid commented 12 years ago

You need to fix your permissions. PermissionEx requires them to be something like this:

worlds:
        world:
            - -worldmodes.mode.creative
            -worldmodes.mode.survival
        Creative:
            -worldmodes.mode.creative
            - -worldmodes.mode.survival
        Survival:
            - -worldmodes.mode.creative
            -worldmodes.mode.survival
        world_nether:
            - -worldmodes.mode.creative
            -worldmodes.mode.survival

Also, remove worldmodes.mode.* from your default group if you are listing all worlds anyways. Leave it in if you have more than the four worlds listed.

It is possible that there is a similar issue in PermissionsEX that was found in PermissionBukkit: re-spawning does sometimes not apply permissions correctly. This is a permissions issue, not a WorldMode issue though and, again, I am not sure it is a problem with PEX

sunkid commented 12 years ago

PS: Make sure that the player reporting this issue gives you all details. E.g. can they really keep a diamond block from creative if they didn't already have one in their survival inventory? What group are they in? Which creative world are the coming from? Also, what plugin provides the /spawn command on your server?

Sk8Sanctified commented 12 years ago

There was nothing in their inventory of the main world. They were in the creative world and I had them /spawn. Items carried over from creative to main world (survival btw). They are in the Builder group, I use essentials spawn.

Sk8Sanctified commented 12 years ago

Thanks for the assistance, I'll let you know how things go.