9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 20:39:13 +00:00

feat: add option to move in emote when out of camera mode

This commit is contained in:
LoJoSho
2023-08-18 10:01:19 -05:00
parent 55890fa4ac
commit f2fab91916
3 changed files with 10 additions and 3 deletions

View File

@@ -37,6 +37,8 @@ public class Settings {
private static final String COSMETIC_EMOTE_AIR_CHECK_PATH = "emote-air-check";
private static final String COSMETIC_EMOTE_DAMAGE_PATH = "emote-damage-leave";
private static final String COSMETIC_EMOTE_INVINCIBLE_PATH = "emote-invincible";
private static final String COSMETIC_EMOTE_CAMERA_PATH = "emote-camera";
private static final String COSMETIC_EMOTE_MOVE_CHECK_PATH = "emote-move";
private static final String COSMETIC_ADD_ENCHANTS_HELMET_PATH = "helmet-add-enchantments";
private static final String COSMETIC_ADD_ENCHANTS_CHESTPLATE_PATH = "chest-add-enchantments";
private static final String COSMETIC_ADD_ENCHANTS_LEGGINGS_PATH = "leggings-add-enchantments";
@@ -129,6 +131,8 @@ public class Settings {
private static String lockedCosmeticColor;
@Getter
private static boolean emoteCameraEnabled;
@Getter
private static boolean emoteMoveCheck;
public static void load(ConfigurationNode source) {
@@ -162,8 +166,9 @@ public class Settings {
addLeggingEnchants = cosmeticSettings.node(COSMETIC_ADD_ENCHANTS_LEGGINGS_PATH).getBoolean(false);
addBootsEnchants = cosmeticSettings.node(COSMETIC_ADD_ENCHANTS_BOOTS_PATH).getBoolean(false);
tickPeriod = cosmeticSettings.node(TICK_PERIOD_PATH).getInt(-1);
viewDistance = cosmeticSettings.node(VIEW_DISTANCE_PATH).getInt();
emoteCameraEnabled = cosmeticSettings.node("emote-camera").getBoolean(true);
viewDistance = cosmeticSettings.node(VIEW_DISTANCE_PATH).getInt(-3);
emoteCameraEnabled = cosmeticSettings.node(COSMETIC_EMOTE_CAMERA_PATH).getBoolean(true);
emoteMoveCheck = cosmeticSettings.node(COSMETIC_EMOTE_MOVE_CHECK_PATH).getBoolean(false);
ConfigurationNode menuSettings = source.node(MENU_SETTINGS_PATH);

View File

@@ -190,7 +190,7 @@ public class PlayerGameListener implements Listener {
Player player = event.getPlayer();
CosmeticUser user = CosmeticUsers.getUser(player);
if (user == null) return;
if (user.getUserEmoteManager().isPlayingEmote()) {
if (!Settings.isEmoteMoveCheck() && user.getUserEmoteManager().isPlayingEmote()) {
event.setCancelled(true);
return;
}

View File

@@ -31,6 +31,8 @@ cosmetic-settings:
emote-invincible: false # If the player should not take damage while doing an emote
# If a player should be put into camera mode when looking at an emote. Highly recommend keeping it as true.
emote-camera: true
# If a player should be able to move in an emote. This option really only affects if "emote-camera" is false
emote-move: false
helmet-add-enchantments: false # If the plugin should keep enchants on helmets. This is useful as some enchantments are client side only.
chest-add-enchantments: false # If the plugin should keep enchants on chestplate. This is useful as some enchantments are client side only.