AriKeysPlugin - Custom Keybinds icon

AriKeysPlugin - Custom Keybinds -----

Receive custom key presses from the AriKeys client mod!



A CLIENT-MOD IS NEEDED TO USE CUSTOM KEYBINDINGS!
[​IMG]
Support Discord

Enjoying the plugin?
Consider leaving a donation! It's a great help and will contribute to the maintaining/development of the plugin!

Introduction:

AriKeysPlugin allows your server to setup and receive custom key-presses from a client with the AriKeys mod installed.
You can specify what keybindings to allow and the possibilities are near endless.

NOTE, THE CLIENT MOD MUST BE INSTALLED TO USE THESE KEYBINDS!
YOU CAN READ MORE AND INSTALL THE MOD HERE.

(Joining your server will not require the client mod, so people will never need to have the mod installed. However, it must be installed if they want to use the custom keypresses you've set up.)

Need to use this on a 1.17.1-1.18.2 server?
Take a look at MythicKeys, the oudated version of this plugin.

Configuration:
Configuring the AriKeysPlugin can be a little complicated at first, but is quite easy once you understand it. Take a look at the default config:
Code (YAML):
Keys:
    example_key
:
        Id
: "myserver:mycoolkey"
        Name
: "Example Key"
        Category
: "Example Category"
        DefaultKey
: 74
        RunCommand
: "say %player%, you just pressed the example key!"
    another_key
:
        Id
: "examplekeytwo"
        Name
: "Another Key"
        Category
: "Example Category"
        DefaultKey
: 77
        RunCommand
: "!msg %player% You pressed another example key. Nice."
First, let's go ahead and add a new key. Implement a new section in the `Keys` list.
In the default config example, we have two sections/keys added already:
`example_key` and `another_key`. The names of these sections are purely for organization and can be named anything.

Each key has four properties that we can change.
Id: The ID (Namespaced Key) of the pressed key which is passed to the event. Each key should have a unique ID. This ID can be used by other plugins to add unique cross-plugin functionality.
Want to use vanilla keybinds instead of adding your own? Just use one of these IDs.
Name: The name of this keybinding as displayed in the settings. Pretty straight-forward.
Category: The category this key falls under in the settings. Should also be straight-forward. The key will be shown under the specified category, when changing your keybinds in the client mod.
DefaultKey: The default keybinding to use. This value is the numeral value of the GLFW Keyboard Keys. For example, 77 is the M key and 74 is the J key.
RunCommand: A command to run on keypress. The commands support a simple %player% placeholder, as well as full PAPI support. If you wish to run a command from the console rather from the executing player, you simply need to add a exclamation mark to the start of the command.
You can leave this empty if you don't want the key to run a command.

Whenever a client (with the mod) joins the server, it will send out your desired keys and the mod will allow the player to use, see and customize (keybinding) them.

API:
Using the AriKeyPlugin API is extremely easy. You simply need to listen for either the AriKeyPressEvent or the AriKeyReleaseEvent. The ID value of the event is the namespaced id corresponding to the specific keybind that has been added in config.yml.
An example:
If you specify a keybind in config.yml with the ID: "myserver:mycoolkey", then whenever that specific keybind is pressed, the AriKeyPressEvent will fire and have an ID with the namespaced key "myserver:mycoolkey", etc.
When the key is released the AriKeyReleaseEvent will be fired.


If you need more help, please ask on my discord or check the GitHub page for the mod.

My Other Plugins
Resource Information
Author:
----------
Total Downloads: 1,016
First Release: Oct 28, 2022
Last Update: Nov 14, 2024
Category: ---------------
All-Time Rating:
4 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings