From c40aca994612a023cea047639eca13f3f2612246 Mon Sep 17 00:00:00 2001 From: Logan Date: Tue, 16 Dec 2025 13:07:03 -0600 Subject: [PATCH] feat: remove entity-cooldown-teleport-packet option as it is no longer used --- .../java/com/hibiscusmc/hmccosmetics/config/Settings.java | 4 ---- .../hibiscusmc/hmccosmetics/user/manager/UserEntity.java | 6 +++--- common/src/main/resources/config.yml | 4 ---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java index 1598fee1..ea1de5a3 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java @@ -43,7 +43,6 @@ public class Settings { private static final String HOOK_WG_MOVE_CHECK_PATH = "player-move-check"; private static final String HOOK_WG_MOVE_CHECK_PATH_LEGACY = "player_move_check"; private static final String COSMETIC_DISABLED_WORLDS_PATH = "disabled-worlds"; - private static final String COSMETIC_PACKET_ENTITY_TELEPORT_COOLDOWN_PATH = "entity-cooldown-teleport-packet"; private static final String COSMETIC_BACKPACK_FORCE_RIDING_PACKET_PATH = "backpack-force-riding-packet"; private static final String COSMETIC_DESTROY_LOOSE_COSMETIC_PATH = "destroy-loose-cosmetics"; private static final String COSMETIC_BALLOON_HEAD_FORWARD_PATH = "balloon-head-forward"; @@ -120,8 +119,6 @@ public class Settings { @Getter private static int tickPeriod; @Getter - private static int packetEntityTeleportCooldown; - @Getter private static Long defaultMenuCooldown; @Getter private static boolean menuClickCooldown; @@ -210,7 +207,6 @@ public class Settings { tickPeriod = cosmeticSettings.node(TICK_PERIOD_PATH).getInt(-1); viewDistance = cosmeticSettings.node(VIEW_DISTANCE_PATH).getInt(-3); - packetEntityTeleportCooldown = cosmeticSettings.node(COSMETIC_PACKET_ENTITY_TELEPORT_COOLDOWN_PATH).getInt(-1); balloonHeadForward = cosmeticSettings.node(COSMETIC_BALLOON_HEAD_FORWARD_PATH).getBoolean(false); backpackPreventDarkness = cosmeticSettings.node(BACKPACK_PREVENT_DARKNESS_PATH).getBoolean(true); diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/user/manager/UserEntity.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/user/manager/UserEntity.java index 8bc645bd..664543c9 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/user/manager/UserEntity.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/user/manager/UserEntity.java @@ -40,9 +40,9 @@ public class UserEntity { public List refreshViewers(Location location) { //Prevents mass refreshes - if(System.currentTimeMillis() - viewerLastUpdate <= 3000) { - return List.of(); - } + //if(System.currentTimeMillis() - viewerLastUpdate <= 3000) { + // return List.of(); + //} Entity ownerPlayer = Bukkit.getEntity(owner); if (ownerPlayer == null) { diff --git a/common/src/main/resources/config.yml b/common/src/main/resources/config.yml index 477999b7..c8b67942 100644 --- a/common/src/main/resources/config.yml +++ b/common/src/main/resources/config.yml @@ -47,10 +47,6 @@ cosmetic-settings: backpack-force-riding-packet: true # This prevents the backpack from being dark when the player is below a block at the expense of making the backpack bright backpack-prevent-darkness: true - # This helps reduce the amount of packets sent for packet entities, but reduces accuracy of the entity. This is in milliseconds. -1 to disable. - # This is useful for servers with a lot of backpacks, as they are passengers, which means the client will update their position automatically within an area where the entity is located. - entity-cooldown-teleport-packet: 500 - # This forces the offhand to always show the cosmetic. False means it will only show when the slot is empty. slot-options: helmet: