Keys - LWC-like container/block protection

Sponge doesn’t yet have an event for hoppers interacting with inventories, so we have to wait for that before I can catch those.

I’ll add an issue for the double-chest/command bug. Good catch.

2 Likes

awesome but can you add a notification when you interact with the block it says you have locked this chest etc. and if you open someone elses chest op and above it will say whos chest it is?

Thanks
Flash4203

1 Like

I believe this might be an issue

String dbPath = Keys.getParentDirectory().getAbsolutePath().toString() + “/keys”

see [Closed] Server Error: Hikaripool problem?

I would try this instead

String dbPath = Keys.getParentDirectory().getAbsolutePath().toString() + File.separator + “keys”

I could be wrong though…who knows, I’m insane

File.separator is only for the gui :stuck_out_tongue:. Really awkward, but I figured that out yesterday (@FerusGrim XD).

Interesting. Well I learned something today.

Either way, the thread referenced there’s an issue with the plugin. Maybe someone can help them out.

I removed Keys like they suggested and it fixed the problem, any suggestions on how to add it back properly?

Nice plugin. I would add a command that would allow you to list all the players who have keys to the block you punch so that you can see the list as the owner of that block.

Hello, I am having an issue where players are unable to unlock their blocks if they want to move them. They have the keys.use permission node, and they can access their locked blocks, just not break them.

Is anyone else having this issue or is it just me as it usually is lol

No one else has reported that issue, what does it say when they try to remove the block?

Yea I am having the same problem as Jesse. :frowning:

If you can find steps to reproduce, please file an issue with more information like Sponge version, etc.

I figured out what is happening. The Pixelmon mod is fighting Keys for the unlock command, I need to figure out how to set up an alias for them to use just for Keys or redirect the Pixelmon command.

@JesseWayne21

You use the commands/aliases feature in the global.conf (server/config/sponge/global.conf)
In the config you will see “commands” Its 3rd from the top. Where it says “aliases” put the following in the “swiggly brackets”

unlock=Keys

So it should look like this:
http://paste.ubuntu.com/15155515/

Then restart then you’re done! When you do /unlock it will run this mod’s unlock command. If you still need to use the Pixelmon’s unlock command just do /pixelmon:unlock <name>

2 Likes

I saw you put a protection to deny players to break blocks under protected chests but if there is an air case under or next to, they can put an hopper to empty protected chests.

Can you add a full protection to deny placement of blocks ?

Hoppers will be handled on their own, but Sponge has not yet added the proper events for us to block that interaction. Outside of that type of interaction and other chests, we don’t need to prevent placement.

I hope can protect the paint and frame

1 Like

/unlock conflicts with Pixelmons /unlock
Anyone know how to get Keys to override it or is that up to the Key’s dev?
:x

@Ren

Find this file in your sponge config /config/sponge/global.conf. Open it and you will see something like this,
(Its under the “commands” section)

commands {
    # A mapping from unqualified command alias to plugin id of the plugin that should handle a certain command
    aliases { }
}

Just put this into the aliases section:

aliases {unlock=Keys}

This feature allows the /unlock plugin to be executed only for this mod without any conflict.

Now say if you wish to do the Pixelmon command /unlock do /pixelmon:unlock

Overall your config should look like this after a simple restart:

commands {
    # A mapping from unqualified command alias to plugin id of the plugin that should handle a certain command
    aliases {
        unlock=Keys
    }
}
2 Likes

Thank you so much!

Is it possible when opening a locked chest to recieve the message “You are opening a chest locked by [Owner]” and a /keys info to see who locked it and the users its shared by.

3 Likes