isWeaponZoomPressed()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package de.pewpewproject.lasertag.client;
2
3
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
4
import net.minecraft.client.option.KeyBinding;
5
import net.minecraft.client.util.InputUtil;
6
import org.lwjgl.glfw.GLFW;
7
8
/**
9
 * Class for holding and registering key bindings
10
 *
11
 * @author Étienne Muser
12
 */
13
public class KeyBindings {
14
15
    private static KeyBinding weaponZoomKeyBinding;
16
17
    public static void register() {
18
19
        weaponZoomKeyBinding = KeyBindingHelper.registerKeyBinding(new KeyBinding(
20
                "key.lasertag.weapon_zoom",
21
                InputUtil.Type.KEYSYM,
22
                GLFW.GLFW_KEY_V,
23
                "keybind.category.lasertag"));
24
    }
25
26
    public static boolean isWeaponZoomPressed() {
27
        return weaponZoomKeyBinding.isPressed();
28
    }
29
}
30