Skip to content

Commit c802c6e

Browse files
committed
feat: return backing keybind when registering keybinds
1 parent b375be3 commit c802c6e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
### Features
44

5-
- Add a method overload to send an empty packet with JamLib network channels.
5+
- Return the backing keybind when registering JamLib keybinds.
66

77
Closed issues: None.
88

9-
[Full Changelog](https://github.com/JamCoreModding/JamLib/compare/0.3.0...0.3.1)
9+
[Full Changelog](https://github.com/JamCoreModding/JamLib/compare/0.3.1...0.3.2)

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ org.gradle.parallel=true
33

44
archive_base_name=jamlib
55

6-
mod_version=0.3.1
7-
release_name=V0.3.1 [1.19]
6+
mod_version=0.3.2
7+
release_name=V0.3.2 [1.19]
88
supported_versions=1.19
99

1010
github_user=JamCoreModding

src/main/java/io/github/jamalam360/jamlib/keybind/JamLibKeybinds.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
public class JamLibKeybinds {
4141
private static final List<JamLibKeybindImpl> KEY_BINDS = new ArrayList<>();
4242

43-
public static void register(JamLibKeybind keyBind) {
43+
public static KeyBind register(JamLibKeybind keyBind) {
4444
KeyBind keyBindBacker = new KeyBind(
4545
"key." + keyBind.modId() + "." + keyBind.name(),
4646
InputUtil.Type.KEYSYM,
@@ -54,6 +54,8 @@ public static void register(JamLibKeybind keyBind) {
5454
));
5555

5656
KeyBindingHelper.registerKeyBinding(keyBindBacker);
57+
58+
return keyBindBacker;
5759
}
5860

5961
@ApiStatus.Internal

0 commit comments

Comments
 (0)