[SEC] Lockette - Simple chest and door lock, no databases! [Moved to BukkitDev]

Discussion in 'Inactive/Unsupported Plugins' started by Acru, Feb 14, 2011.

  1. Offline

    Acru

    Lockette - The sign-based container and door lock for Bukkit! - by Acru Jovian

    ElgarL has been assigned as the current maintainer of this project, please forward any important issues to him as well. This post is abandoned, but proceed to BukkitDev for updates.

    Download it at BukkitDev! (Alternate) (JAR) (Source), also view the Change Log on BukkitDev.



    Supported external plugins:
    • Permissions - Permissions/Groups
    • GroupManager - Permissions/Groups
    • PermissionsBukkit - SuperPerms/Groups
    • PermissionsEx - SuperPerms/Groups
    • bPermissions- SuperPerms/Groups
    • Towny - Groups/Zones
    • SimpleClans - Groups
    • mcMMO - Groups (Disabled by default now, due to issues.)
    • Factions - Groups
    • LWC - Zones
    • Register - Economy
    Alternate languages included:
    Confirmed compatible plugins: ColorSign, SpeedSign.
    Conflicting plugins: ChestShop, Most sign editors!


    The active Lockette information page will commute to BukkitDev soon, but the forum thread is still the best place for discussion.



    Overview:

    The purpose of this plugin is to restrict access to the contents of chests, dispensers, furnaces, and doors without the use of a database to track containers.

    To use, simply place a signpost on the floor directly beside a chest or other container to be locked. Enter [Private] as the first line. Your own name will automatically be entered on line 2 as the chest owner. Optionally type in the full names of two other users allowed to access the chest's inventory on lines 3 and 4.

    When done correctly, the sign will automatically fix itself to the side the target chest, protecting it from unauthorized access! Only the chest's owner can then break the sign or chest. (Warning: Anyone with permission to use WorldEdit commands or similar can circumvent the protection by removing the sign.)

    [​IMG]

    Additionally, you can enter [Everyone] on lines 3 or 4 instead of a user name to allow everyone access to the contents of a private container, or [Operators] to allow ops access. If a Permissions plugin is available, you can use groups like [Moderator] or [Admins] or others as defined in the Permissions settings files.

    The owner of a container can add more users by placing additional signs beside the container with the heading [More Users], where lines 2-4 specify the names of the additional users. You can edit the users on previously placed signs by right clicking the sign, and using the command '/lockette <line number> <text>' to change it.


    Working with Doors:

    To protect a door, you can use the same method as protecting a container, the sign will attach to the door automatically. In addition, you can attach a [Private] wall sign to any side of the blocks just above or just below a door. For double doors only one side needs a sign. Door support is enabled by default in the config file.

    Once a door is protected it will only open for someone listed as a user, and will not respond to redstone power or switches unless [Everyone] is listed as a user. Iron doors which usually won't open from clicking will work just as wooden doors. In addition, double doors will open together automatically!

    You can also use [More Users] signs as with containers, with the caveat that the sign cannot be placed on the block above the door if the [Private] sign is not above the door as well! (This is done to prevent a security uncertainty issue.)

    Protected doors will be closed automatically if a timer is set. A timer can be set globally with a configuration option, or individually for each door by using the tag [Timer: #] on line 3 or 4 of the [Private] sign, where # is the number of seconds that the door should remain open. If the timer is set to 0, this means the door will never automatically close. If no timer is specified, protected doors will use a global timer set in the configuration file. If the server is shut down cleanly any open doors will be closed, but in the event of a server crash while a door is open, it may remain so. Note that the initial state of a door is assumed to be closed.

    Care must me taken to place protected doors on a stable block. Building a door on sand, gravel, leaves, TNT and et cetera are allowed by the plugin, but cannot be secured fully. :3 Additionally, it should be noted that most status messages still refer to locked blocks as containers, so for the purpose of simplicity, doors should be considered as a type of container.


    Features:
    • No passwords or databases needed!
    • Permission checks run in constant time, no matter how many protected containers.
      • One owner and up to 11 additional users supported. (17 for double chests!)
      • Allows access to [Everyone] while still protecting the container from vandalism.
      • Allows group names in conjunction with many other plugins.
    • Special powers for ops or admins, configurable with permissions.
      • Reports when an admin does something naughty.
    • Protects single and double chests, dispensers, and furnaces.
      • Explosion and block-break protection for the protected container and sign.
        • Option to protect all containers from explosions.
    • Full support for doors, both wooden and iron!
      • Double doors are handled automatically, with no redstone.
      • Doors can be set to close automatically, via a timer setting.
      • Redstone hacking is disabled for protected doors.
    • Prevents creation of chests larger than 2 blocks.
    • Informative or helpful messages when interacting with containers.
      • The first time a chest is placed, a help message will be shown.
      • Types of messages shown are configurable in settings.
      • Additional language support.

    Advanced Setup (Permissions) (open)

    Advanced Setup:
    There are a few things you can now customize in the configuration files for the plugin, found in the plugins/Lockette folder. After running the plugin for the first time, two files will be created, config.yml and strings.yml. The first holds the following settings:
    • enable-permissions - Allows the use of permission nodes to specify who can do what. If this is disabled, groups will still be used but admin status is taken from the ops file. Defaults to false.
    • enable-messages-* - Enables or disables groups of messages listed in the strings.yml file. Not counting the broadcast ones.
    • broadcast-*-target - Sets the group or player that specific broadcast messages should be sent to. This can be set to "" for no one.
    • explosion-protection-all - Enabling this extends explosion protection to all containers on the server, not just [Private] ones. Default is disabled.
    • allow-admin-bypass - Allows admins to go though any protected door. Default is true.
    • allow-admin-snoop - Allows admins to peek into chests owned by other people. Default is false, and this setting is recommended! A broadcast message will be sent each time an admin snoops in a protected container where the admin doesn't have permission to. The message will be sent to a player or group as specified in another option. Admins can still break protection on chests if this is disabled, however.
    • enable-protection-doors - Enables support for private doors, defaults to true.
    • default-door-timer - Sets the door closing timer for all protected doors on the server, unless overridden by a specific sign. Defaults to 0, which disables the door closing timer.
    In the strings.yml file, you can set alternate language tags for [Private] and such, in ANSI format. If you need characters not in ANSI then you might try UTF-8 format, though it seems bugged tight now. The default alternate tags are in French, but server ops are free to translate the whole file into the language of their choice. If you do this, please share it back to me~ :3 If you want to disable only a specific message, you can set it to "", the empty string. Admins can use the command '/lockette reload' after editing the configuration files, to reload them.

    If a Permissions plugin is not available or the enable-permissions option is set to false, Lockette will use the ops file to determine who are admins. Admins can break the protection on any chest, and look inside protected chests (only if the related option is set), as well as reload the plugins configuration files. All non-ops will be able to create protected containers for themselves.

    If a Permissions plugin is available and the enable-permissions option is set to true, the following nodes will be used instead of the ops file and are included by default in the '*' node:
    • lockette.user.create.* - Permission required to create a protected container or door. Possible sub-nodes include chest, dispenser, furnace, and door. (The permission lockette.create.all is still supported, but obsolete.)
    • lockette.admin.create.* - Allows admins to create containers and doors for other users. Possible sub-nodes include chest, dispenser, furnace, and door. Leave line 2 blank for the default behavior or enter the name of your choice. Capitalization matters.
    • lockette.admin.break - Allows breaking protection on containers.
    • lockette.admin.bypass - Allows opening of any locked door.
    • lockette.admin.snoop - Allows peeking in protected containers. (The setting allow-admin-snoop must be true.)
    • lockette.admin.reload - Allows use of the reload command.

    Technical Information (open)

    Technical Information:

    This plugin has been tested and shown to be working for many builds of CraftBucket though a number of the more recent builds had a serious issue, so I'm suggesting a minimum build of 561 now. If you update past what is listed in the post's title and the plugin seems to break, it is probably not my fault. Post a note anyway and I'll see about fixing. I'll try and keep up with the new recommended build system, but for latest builds that break things, you should expect some time to pass before I take care of the issue, as this plugin is now mature. :3

    If there are multiple containers by the placed sign, the plugin will use the NESW rule to choose the first container that is not yet private. To elaborate, the plugin will check to the north of the sign first, and if no container or door is available to the north, it will continue checking clockwise around the sign.

    Due to the current implementation of the explosion event, this plugin will cancel all explosions that would damage the container or sign, rather than just remove the container and sign from the blocks to be damaged. Canceled explosions still knock signs off the walls. Canceled explosions leave signs looking blank, but this is just a graphic glitch, reconnect to fix.

    Bonus: This plugin will prevent chests bigger than 2 blocks from being created via glitches. (Again, this could be circumvented using WorldEdit commands, so take care who has access to such a plugin.)

    This plugin was inspired by the old hmod plugins Lock by Roman "kingseta" Pramberger and ChestCapsule by Fernando "Fergo".

    Hooking into Lockette (open)

    Hooking into Lockette:

    If you are a plugin author and want to connect to Lockette, you can use a public static function to get information about the protected status of a block.

    More info later, perhaps, but if you need the details now then go poke through the source~

    Future Possibilities:

    There are a number of things that have been suggested, and they tend to be added to the list below if I think they might be a good idea. However, some sort of locked container limit is requested often but this is not possible without a database to track the number of locked containers someone has. All things considered, this will not be supported. On the up side, without a database you can have literally millions of locked containers without any sort of lag, and there are permissions to restrict who can create locked chests. Perhaps only allow Moderators to create locked chests for other users, if you don't want to allow infinite locked chests.

    Aside what has already been implemented, the following may or may not appear in future versions:
    • Furnace/dispenser clusters, protected by a single sign.
    • [Log] sign to list recent users of a container or door.
    • iConomy fee for protecting containers/doors.
    • Worldguard connection.
    • [Protected] tag for viewing only.
    • Specific time range that doors can be opened.
    • DataLog plugin support.
    • More types of protected blocks, such as brewing stands.
    If you want any of the above features sooner than never, let me know! However, I currently see Lockette as functionally complete, for the most part, in that it already has all the functionality it needs. Future updates will mostly be to account for changes in Minecraft and Bukkit.


    Final Note:

    Please leave a reply if there are any bugs or suggestions, and if you like this plugin you can click the like button at the bottom of this post~ Thanks to those few that have donated! [​IMG]
     
  2. Offline

    bizzig

    Is there a way to create a lock so only certain permission groups can use it (eg. VIP only room/chest)
     
  3. Offline

    Greylocke

    From the OP:
    Is that what you're looking for?
     
  4. Offline

    hallowhead1

    hey, i feel like this plugin is leaking ram, can we get an update? i mean i know its working but..
     
  5. Offline

    Greylocke

    It is much more likely that you're seeing chunk unloading issues. What evidence do you have that Lockette would be leaking RAM? Considering the way that Lockette works, it is extremely unlikely...
     
  6. Offline

    hallowhead1

    my server host provider tells me that all un-updated plugins leak ram.. Im not accusing you they are, this plugin seems so light weight, but i am just curious?
    Could you guys do an update?
     
  7. Offline

    discoverdan

    Hello, just a quick question, how come whenever I change the strings.yml file and do a server reload, it reverts back to the default string.yml file? It won't let me change it for some reason...

    Sorry, I noticed this in the console:

    Code:
     2012-09-12 15:23:30 [WARNING] [Lockette] Error loading strings-en.yml: while scanning for the next token
    found character @'@' that cannot start any token
    in "<string>", line 16, column 20:
    msg-admin-release: @@@ has broken open one of ***s ... 
    ^
    
    2012-09-12 15:23:30 [WARNING] [Lockette] Returning to default strings.
    So I put the string inside ' like '@@@ fdklhdfhfksl' and it worked, thank you anyway.
     
  8. Offline

    bizzig

    haha yes. I must have skipped that whole part when reading. Many thanks!
     
  9. Offline

    millardm

    I am confused. Is there a way to make TNT able to destroy locks?
     
  10. Offline

    Michael Erikson

    hadriel likes this.
  11. Offline

    BlacklCE

    Hi Acru,

    I'm a server owner, and to use Lockette in my server, I translated it to Brazillian Portuguese (pt_BR), and in retribution for this awesome plugin, here are the translated file (it's the minimum I can do):
    <Edit by Moderator: Redacted mediafire url>

    Donations will follow as soon as my server start profiting ;)
    Thanks for all
     
    Last edited by a moderator: Dec 15, 2016
  12. Offline

    PLPatrick

    Question: Is it possible to turn off this plugin in one World?
     
  13. Offline

    Greylocke

    sounds like a permissions thing to me. Can't you just exclude/deny lockette permissions for that world?
     
  14. Offline

    Mrchasez

    What is less intensive this or LWC?
     
  15. Offline

    ScarsHD

    Would anyone have the version of lockette for craftbukkit 1060 handy? Thank you.
     
  16. Offline

    Maniac76

    Hi guys !

    Amazing plugin, but how to bypass any content ? because it only works with doors, and i dont see chest and other, i dont want break, juste see all containers, it is possible ?

    Also, how to reload lockette whit permissionsbukkit ? because does not work if im not operator although i put in the "lockette.*: true" and "lockette.admin.*: true", and lockette.admin.reload: true don't work.

    Do you have an solution ? thanks in advance =)
     
  17. Offline

    Greylocke

    Maniac76 you should check out the "Advanced Setup (Permissions)" section in the original post. Everything you need is there.
     
  18. Offline

    Maniac76

    Finally the reload works, but since there was no message when i reload i think that not work :noob:

    But it does not solve my other problem, i want when a moderator (for exemple) "snoop" container, he can not pick item inside.
     
  19. Offline

    ZacIsCool6756

    Will This work with other sign-based plugins (such as my worlds, which uses signs to control portals)?
     
  20. Offline

    Jemrada

    Is it possible to use Lockette to protect a door from Zombies in Difficulty work setting Hard? In setting Hard they can break the door.
     
  21. Offline

    chopstick121

    how can i disable [More user]
     
  22. Offline

    ajack38

    Hi, I was wondering if this works on 1.3.2 R1, and if not, when will you be upgrading so that plugin meets the standards for 1.3.2 R1.
     
  23. Offline

    Greylocke

  24. Offline

    ajack38

    Thanks for the reply.
     
  25. Perfect traduction for Portuguese/BR by euQsei www.maniacraft.com.br

    Code:
    language: Portugues-BR
    author: Acru
    editors: ''
    version: 0
    alternate-private-tag: Protegido
    alternate-moreusers-tag: Mais usuarios
    alternate-everyone-tag: Todo mundo
    alternate-operators-tag: Operadores
    alternate-timer-tag: Timer
    alternate-fee-tag: Taxa
    msg-user-conflict-door: Porta com conflito removida!
    msg-user-illegal: Bau ilegal removido!
    msg-user-resize-owned: Voce nao pode redimensonar esta protecao reivindicada por ***.
    msg-help-chest: Coloque uma placa com [Private] na primeira linha para proteger isso.
    msg-owner-release: Voce colocou um recipiente!
    msg-admin-release: (Admin) @@@ quebrou uma protecao de ***!
    msg-user-release-owned: Voce nao pode liberar a protecao reivindicada por ***.
    msg-owner-remove: Voce removeu os usuarios desta protecao!
    msg-user-remove-owned: Voce nao pode remover os usuarios da protecao reivindicada por ***.
    msg-user-break-owned: Voce nao pode quebrar a protecao reivindicado por ***.
    msg-user-denied-door: Voce nao tem permissao para usar essa porta.
    msg-user-touch-fee: 'Uma taxa de  ### sera paga a ***, para abrir.'
    msg-user-touch-owned: Esta protecao foi reivindicada por ***.
    msg-help-select: Placa selecionada, use /lockette <linha numero> <texto> para editar.
    msg-admin-bypass: Ignorada uma porta de propriedade de ***, certifique-se de fecha-la.
    msg-admin-snoop: (Admin) @@@ esta bisbilhotando uma protecao feita por ***!
    msg-user-denied: Voce nao tem permissao para abrir isso.
    msg-error-zone: Esta area eh protegida por ***.
    msg-error-permission: Permissao para proteger isso foi negada.
    msg-error-claim: Sem recipientes por perto para proteger!
    msg-error-claim-conflict: Conflito com uma porta ja existente.
    msg-admin-claim-error: Jogador *** nao esta online, certifique-se de ter escrito o nome corretamente.
    msg-admin-claim: Voce nao pode reivindicar uma protecao de ***.
    msg-owner-claim: Voce reivindicou uma protecao!
    msg-error-adduser-owned: Voce nao pode adicionar usuarios a protecao reivindicada por ***.
    msg-error-adduser: Nenhuma protecao por perto para adicionar usuarios!
    msg-owner-adduser: Voce adicionou usuarios a uma protecao!
    msg-help-command1: '&C/lockette <linha numero> <texto> - Edita a placa que protege o objeto.
      Clique com botao direito na placa para editar.'
    msg-help-command2: '&C/lockette fix - Corrige uma porta automatica que esta com posicao errada. Olhe para a porta para editar.'
    msg-help-command3: '&C/lockette reload - Recarrega os arquivos de configuraca. Somente para OP e ADM.'
    msg-help-command4: '&C/lockette version - Exibe a versao do plugin.'
    msg-admin-reload: Recarregando os arquivos de configuracao.
    msg-error-fix: Nenhuma porta com dono encontrada.
    msg-error-edit: Primeiro selecione um objeto clicando com botao direito.
    msg-owner-edit: Placa editada com sucesso.
    
     
  26. Offline

    tsuttsu305

    -English-
    This is Japanese translation.
    (But, some untranslated)

    -Japanese-
    日本語訳です。
    (しかし、一部翻訳していません。)
    Code:
    language: Japanese
    author: tsuttsu305
    editors: ''
    version: 0
    alternate-private-tag: Private
    alternate-moreusers-tag: More Users
    alternate-everyone-tag: Everyone
    alternate-operators-tag: Operators
    alternate-timer-tag: Timer
    alternate-fee-tag: Fee
    msg-user-conflict-door: 指定されているドアが外されました!
    msg-user-illegal: 違法チェストが取り除かれました!
    msg-user-resize-owned: これは ***の保護内のためサイズ変更はできません。
    msg-help-chest: チェストが設置されました。ロックするには看板を貼り付けてください。
    msg-owner-release: ロックを解除しました!
    msg-admin-release: (Admin) @@@ は ***のロックを解除しました。
    msg-user-release-owned: "***によってロックされているため解除できません。"
    msg-owner-remove: 追加ユーザ看板を取り外しました
    msg-user-remove-owned: "***によってロックされているため取り外すことができません。"
    msg-user-break-owned: "***によってロックされているため破壊できません。"
    msg-user-denied-door: このドアを操作する権限がありません。
    msg-user-touch-fee: 'A fee of ### will be paid to ***, to open.'
    msg-user-touch-owned: "***によってロックされています。"
    msg-help-select: 看板を選択しました, /lockette <行番号> <内容> で編集できます。
    msg-admin-bypass: 特権で ***がロックしたドアを操作しました。ロック保持のためドアを戻してください。
    msg-admin-snoop: (Admin) @@@ は特権で ***がロックしたチェストを操作しました。
    msg-user-denied: "権限がありません。"
    msg-error-zone: このエリアは ***によって保護されています。
    msg-error-permission: 権限がないためロックできません。
    msg-error-claim: No unclaimed container nearby to make Private!
    msg-error-claim-conflict: すでにロックされているドアと競合しています。
    msg-admin-claim-error: "***はオフラインです。IDが合っているかどうか確認してください。"
    msg-admin-claim: "***名義でロックしました。"
    msg-owner-claim: ロックしました!
    msg-error-adduser-owned: "***によってロックされているため追加できません。"
    msg-error-adduser: No claimed container nearby to add users to!
    msg-owner-adduser: アクセス許可を追加しました!
    msg-help-command1: '&C/lockette <行番号> <内容> - 実行前に右クリックされた看板の内容を編集します。'
    msg-help-command2: '&C/lockette fix - ロックされたドアのズレを修正します。'
    msg-help-command3: '&C/lockette reload - 設定を再読み込みします。(管理者コマンド)'
    msg-help-command4: '&C/lockette version - Locketteのバージョンを表示します。'
    msg-admin-reload: Pluginのconfig.ymlを再読み込みしました。
    msg-error-fix: ロックされていません。
    msg-error-edit: はじめに編集する看板を右クリックしてください。
    msg-owner-edit: 看板の編集に成功しました。
    
     
  27. Offline

    dramatech88

    Greetings all I need some help. I want to disable that message that says *admin* has snooped in chest owned by *player*. How do I get that to go away. Please help me. Thanks.
     
  28. Offline

    Greylocke

    in the Lockette config.yml, change the "broadcast-snoop-target:" setting to the appropriate player or group. If you do not want anyone to see that broadcast, then set it to "" (two double quotes with nothing between them).
     
  29. Offline

    ChrisMintjes

    Can i Add groups to enter the door or chest?
     
  30. Offline

    Greylocke

    From the OP:
     
  31. Offline

    marubal21

    Will this plugin be updated for Minecraft 1.4, does it need to be updated?
     

Share This Page