Giter Club home page Giter Club logo

serialkey's Introduction

SerialKey

This plugin allows you to lock your doors with a craftable key. It has a master key too.

Features

  • Lock your doors, chests, trapdoors, ...
  • A craftable key, master key, key clone, bunch of keys and even a padlock finder !
  • Every craft has its own permissions.
  • Every item has its own permissions.
  • Auto updates.
  • Everything is configurable.
  • Compatible with the new doors (1.8).
  • Open-source (licensed under GNU GPL v3).

How to use it ?

Left click on a door with an empty key in your hand will create a padlock on the door and will format the key. You can open, close or destroy the door only if you have the corresponding key in your hand. Also works for chests and trapdoors.

Documentation

This is the documentation for SerialKey v1.0.

How to clone a key ?

As of v0.2, you are able to clone a key. It is easy, all you have to do is to put a blank key next to a key, like that :

Key clone craft

That's all ! You get two keys and they open the same padlock.

How to use the bunch of keys ?

As of v0.2, you are able to create a bunch of keys (see below for the default craft). Right click with it will open an inventory in which you can put keys in. It is limited to one key per slot.

Bunch of keys craft

You can open padlocks with a bunch of keys if it contains the correct key.

How to use the padlock finder ?

As of v0.2, you are able to create a padlock finder with the following craft (a key next to a compass) :

Padlock finder craft

When you make a right click with it, every compass in your inventory will point to the selected padlock. Right click again with a padlock finder to disable it.

Commands

/serialkey getkey - See below for permission. - Allows you to get the key corresponding to your facing block.

Permissions

A permission plugin may be needed to use with Sponge platform.

  • serialkey.craft.key - Allows you to craft a key. - Default : Everyone.
  • serialkey.craft.masterkey - Allows you to craft a master key. - Default : Operators.
  • serialkey.craft.keyclone - Allows you to craft a key clone. - Default : Everyone.
  • serialkey.craft.bunchofkeys - Allows you to craft a bunch of keys. - Default : Everyone.
  • serialkey.craft.padlockfinder - Allows you to craft a padlock finder. - Default : Everyone.
  • serialkey.use.key - Allows you to use a key. - Default : Everyone.
  • serialkey.use.masterkey - Allows you to use a master key. - Default : Operators.
  • serialkey.use.bunchofkeys - Allows you to use a bunch of keys. - Default : Everyone.
  • serialkey.use.padlockfinder - Allows you to use a padlock finder. - Default : Everyone.
  • serialkey.command.getkey - Allows you to use /serialkey getkey. - Default : Operators.

Configuration

Please stop your server before each modification !
NOTE : .yml can be replaced by .conf for Sponge.

config.yml

This file allows to configure the plugin.

enable - Contains the third party services options.
updater - If you want to automatically check for updates (or update the plugin for Bukkit).
metrics - If you want to enable bStats.

options - Contains the plugin options.
reusable-keys - When you destroy a door, if this option is set to true, the plugin will pop a blank key in front of yourself. Otherwise, the key will be broken.
disable-hoppers - If you want to disable the ability to place hoppers next to locked chests.
encrypt-lore - This will encrypt keys' lore with the ROT47 algorithm.
can-rename-items - Whether items can be renamed (be warned : any item of the same kind can be used as a replacement). — allow-lost-chests - Whether players can place keys that unlock chests in them.

key - Contains the key item options.
material - The key item material. A list of materials is available here.
name - The key item name. Supports colors.
shape - The key item craft's shape. Max. three lines and three characters by line. Example : 'ABA', 'BAB', 'ABA'.

The default craft is :
Key default craft

master-key - Contains the master key item options.
material - The master key item material. A list of materials is available here.
name - The master key item name. Supports colors.
shape - The master key item craft's shape. Max. three lines and three characters by line. Example : 'ABA', 'BAB', 'ABA'.

The default craft is :
Master key default craft

bunch-of-keys - Contains the bunch of keys item options.
material - The bunch of keys item material. A list of materials is available here.
name - The bunch of keys item name. Supports colors.
shape - The bunch of keys item craft shape. Max. three lines and three characters by line. Example : 'ABA', 'BAB', 'ABA'.

The default craft is :
Bunch of keys default craft

shape-materials-vX - Contains data about the shape. Example : A: GRASS, B: STONE, C: SPONGE. Do not take care about vX. A list of materials is available here.

messages.yml

This file contains the plugin messages. You can translate it in your language.

data.yml

This file contains the plugin data. Please, ignore this (and do not edit it manually)._

Videos

Here is the official video (but it is a bit outdated). If you have a YouTube channel and have made a video, do not hesitate to send it to me. I will post it with pleasure !

Donations

Development costs time and time is the money of life. Please feel free to donate.

Donate

serialkey's People

Contributors

dependabot-preview[bot] avatar skyost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

serialkey's Issues

Key items (tripwire hook) placeable on walls

Im using latest SerialKey 1.0.2, Minecraft 1.12.2, forge-1.12.2-14.23.5.2838, spongeforge-1.12.2-2825-7.1.6 (setup for Pixelmon).

Item for key (default tripwire hook) can be placed on wall, but after breaking it, it drops normal tripwire hook instead of key item.

Some Questions

Hey :)

first of all, nice Plugin 👍

Is it possible to implement a feature that a player can not remove the Keys if hes not a the Owner?
And if i got no Permission to use Keys though it will open. It spams that ive dont have permission.

Thank you

Consumable keys

Could you please add the option for keys to be consumed when used?

[Bug] Duplicate keys with "bunch of keys"

I tested this mod for the first time today.

I found a unexpected behaviour (I think at least). I crafted a stack of "bunch of keys". Then I right-clicked the stack. I put in my key. Then I spread out the stack in my inventory and for every "bunch of keys" I have a copy of the key.

I think you get the point.

Is there a way to disable this on chests

Hello there! I was wondering if there will be or is a way to remove this on chests as in my server i only want the keys to be used on doors, any plans for that in the future or any way for me to do that now?

Add a maximum usage amount

I'd like to use this plugin w/ vault to sell keys with X amounts of usages.
Example: Sell train tickets with varying degrees of usage
1 use , 5 uses, 30 etc.
time based usage, unlimited uses for x minecraft days

After the uses run out, the key gets destroyed

Update

Can you update the plugin? I need the 1.15.2 version

Bunch of keys is gone after right click on mobs

This is normal behavior I guess since bunch of keys is taking NAME_TAG properties
Not sure if this can be fixed.

When I right click on a mob while holding bunch of keys, the bunch of keys is gone and the mob named Bunch of Keys.

Key question

Hi!

I have just seen the release of the Sponge counterpart at Ore. Without having the plugin tested but by reading the code, I suspect that the key items are identified by their name. Is that correct? If that is the case, a player could renamed any item with the correct item type to the key name to unlock a door/etc. Or am I wrong?

Plugin not working; NoSuchFieldError: COMMAND_BLOCK

It errors on load (start)
git-Paper-1618 (MC: 1.12.2)
so, could be that of course, but ye fyi, none of the versions work on it, and no config,
so probably because of it being paper, but yee who knows

[17:42:15] [Server thread/INFO]: [SerialKey] Enabling SerialKey v1.0.3[17:42:15] [Server thread/INFO]: [SerialKey] Enabling SerialKey v1.0.3[17:42:15] [Server thread/ERROR]: Error occurred while enabling SerialKey v1.0.3 (Is it up to date?)java.lang.NoSuchFieldError: COMMAND_BLOCK at fr.skyost.serialkey.bukkit.config.BukkitPluginConfig.<init>(BukkitPluginConfig.java:71) ~[?:?] at fr.skyost.serialkey.bukkit.SerialKey.onEnable(SerialKey.java:68) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:289) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1618] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281][17:42:15] [Server thread/INFO]: [SerialKey] Disabling SerialKey v1.0.3[17:42:15] [Server thread/WARN]: java.lang.NullPointerException[17:42:15] [Server thread/WARN]: at fr.skyost.serialkey.bukkit.SerialKey.onDisable(SerialKey.java:128)[17:42:15] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266)[17:42:15] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:350)[17:42:15] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:437)[17:42:15] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:320)[17:42:15] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)[17:42:15] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395)[17:42:15] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344)[17:42:15] [Server thread/WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442)[17:42:15] [Server thread/WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403)[17:42:15] [Server thread/WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341)[17:42:15] [Server thread/WARN]: at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:289)[17:42:15] [Server thread/WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616)[17:42:15] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:748)

probably due to
shapeMaterials["C"] = Material.COMMAND_BLOCK.name
where .name would crash it, should be inside a try{}catch{} or like it sets Material.COMMAND_BLOCK = Material.COMMAND that makes that part crash-proof ;)

Suggestions / bug / question

Suggestion 1: Adding the ability to lock barrels would be cool.
Suggestion 2: Also would be cool if you could change how many spots there are in the Bunch Of Keys item from the config.

Bug: I have my keys named and I put them in a Bunch Of Keys, then when I reopened the Bunch of Keys, they were renamed back to "Key".

Question: Does the plugin work on 1.16.x or 1.15.x?

[Bug] Place key inside chest it locks

It's possible for users to lock a chest with a key and then place the key in that chest, thereby making the chest inaccessible and unbreakable. This could potentially be a major problem since the only way to fix this issue is for an op to manually unlock the chest.

Key cloning isn't working

Cloning keys isn't possible, when crafted I get normal key!
However this feature works with the older version SerialKey v0.4
but not with the latest 1.0.1

[Bug] Mod fails to start when using Pixelmon item as key object

When setting the "material=" option for a key/bunch/master to any Pixelmon item, the mod simply refuses to load, and spits out the below error to console. I'm unsure if this is specific to pixelmon or applies to other mod items as well, however when changing the Material back to its default value the issue goes away.

#works
material="minecraft:tripwire_hook"

#does not work
material="pixelmon:poke_ball"
[15:04:03] [Server thread/WARN] [Sponge]: /* Owning Mod/Plugin: serial-key
[15:04:03] [Server thread/WARN] [Sponge]: /* Exception:
[15:04:03] [Server thread/WARN] [Sponge]: /* java.lang.NullPointerException: null
[15:04:03] [Server thread/WARN] [Sponge]: /*     fr.skyost.serialkey.sponge.SerialKey.onGameStarted(SerialKey.java:163)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.common.event.listener.GameStartedServerEventListener_SerialKey_onGameStarted42.handle(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:381)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:454)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:415)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:253)
[15:04:03] [Server thread/WARN] [Sponge]: /*     org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:340)
[15:04:03] [Server thread/WARN] [Sponge]: /*     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:04:03] [Server thread/WARN] [Sponge]: /*     sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     java.lang.reflect.Method.invoke(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.EventBus.post(EventBus.java:217)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
[15:04:03] [Server thread/WARN] [Sponge]: /*     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:04:03] [Server thread/WARN] [Sponge]: /*     sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     java.lang.reflect.Method.invoke(Unknown Source)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
[15:04:03] [Server thread/WARN] [Sponge]: /*     com.google.common.eventbus.EventBus.post(EventBus.java:217)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraftforge.fml.common.LoadController.redirect$forgeImpl$PostEvent$zza000(LoadController.java:568)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraftforge.fml.common.Loader.serverStarted(Loader.java:799)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarted(FMLCommonHandler.java:302)
[15:04:03] [Server thread/WARN] [Sponge]: /*     net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488)
[15:04:03] [Server thread/WARN] [Sponge]: /*     java.lang.Thread.run(Unknown Source)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.