Lockette (Sponge version)

First of all I’m not the original dev for Lockette, and I thought long about using this name, but I guess most people are looking for the name. I still didn’t find anything like the original in the Plugin Realeases category I thought I’d write my own Lockette-Like.

Other plugins that are similar:
Latch by Nighteyes604
Locket by Himmelt
and a few WIP plugins like:
LEC by rojo8399
Lockf by Kailang

Lockette works pretty much like the original: No config, no database, just put a sign next to a door/container and it will be protected.

Write [private] in the first line and username in the 3 following lines. Don’t put on any names and you’ll be added to the sign automatically. If the lock was created successfully the first line will change to [Lockette]. If you’re about to lock yourself out the Lockette will notify you and provide some solutions:

Additionally I added PluginLocks that can be added via 3rd party plugins. For security reasons a plugin may only edit Locks it owns. These locks can hold a bypass permission and custom Serializable data that save into the default config.

I managed to prevent most griefing, including TNT and placing hoppers below protected containers. Also: you can’t lock your container on accident by putting it next to a sign you’re not permitted on. However I currently do not protect against pistons (I don’t know if that’s really necessary).

For more information and the download visit the GitHub

Latest Version: 1.1 (2016-07-31)
(Written, compiled and tested for spongevanilla-1.12-7.0.0-BETA-303)

Have a nice day, DosMike

3 Likes

Stating a vulnerability of your chest locking plugin in the topic post seems like kind of a turn off.

Without some kind of plot protection locking doors is rather meh anyways as you can just break through the wall. and for containers usually can’t be pushed by pistons so I think it’s not that big of a problem or do I miss something there?
Also better mention it now before someone get’s disappointed for discovering it on a live server.

If I recall correctly, you can piston push signs and break them.

Just tested it again, sign block pistons completely.

Gotcha. Apologies, forgot how MC mechanics worked for a moment.

Oh, and additionally, You do know that Latch exists? I won’t link it but chest locking plugins exist, contrary to the OP.

Why’s it lock you out if you don’t put your username? Shouldn’t it be able to tell who placed the sign?

@codeHusky I didn’t know that.
From what I see Latch is completely command based, that’s a bit of a different approach, but I’ll mention it in the OP

@pie_flavor it does.
If you only put [private] on the sign it will add your name. The reason I do not automatically add your name if you put any other name on it is that maybe you want to demonstrate it to your friend or someone asks you to lock something for them because they are currently busy doing something else somewhere in the world.
And if you do lock yourself out on accident you can still ask an admin to remove the lock.

It seems rather counter intuitive to allow someone to lock something for someone else and not give them access to the lock themselves. They should at least have the option to remove the lock.

:thinking: well i could check access after adding a lock and provide a undo in chat if the player has no acces like:
[Lockette] The lock you just added prevents you from accessing the container/door - if that was an accident click [undo]

That, and also having an option to allow people to add themselves to the lock by clicking.

or maybe?

[private:me]
[name1]
[name2]
[name3]

that would add 4 names, including yourself.

[private]
[name1]
[name2]
[name3]

which would only add the 3 specified names

Just assuming that the person who placed the sign wanted to be part of the lock as well should suffice.

1 Like

I can’t reference the person placing a sign indefinitely without having to store the owner in some kind of config, thus using me or alike is not really possible.
Also I like being able to see who’s permitted by name. And you can always just add another sign.

Locking yourself out shouldn’t be that easy any more as you can fix your mistake using the options Lockette provides in chat:

  • Remove the lock by making it a regular sign,
  • replace a name on the sign or
  • (if there’s still room) add your name to the list.

These options are valid for one minute, until you disconnect or someone breaks the lock (preventing grief after asking a admin to remove the sign, wait for someone to lock the container and then manipulating it)

You should really be using some form of data store to persist that kind of data though, I mean right now it isn’t really scalable is it? Max of 3 names per container isn’t really sufficient is it, even if it’s a simple SQLite db or something…

You can just add another sign to permit additional players to the container/door

Is there any admin perms so they can remove old signs?

Actually there is. it’s not the best, but that’s what I came up with…
dosmike.lockette.check.if.user.is.op
Edit: this also allows admins to completely bypass locks

1 Like