From be49cb12fbc498f1b911dcc68ae828c3a7da255a Mon Sep 17 00:00:00 2001 From: LOOHP Date: Wed, 29 May 2024 02:05:28 +0100 Subject: [PATCH 1/3] Minecraft 1.20.6 --- pom.xml | 23 +++++++++++-------- .../luffbox/smoothsleep/lib/ConfigHelper.java | 12 +++++----- .../luffbox/smoothsleep/lib/MiscUtils.java | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index a382065..749218f 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ purpur - https://repo.pl3x.net/ + https://repo.purpurmc.org/snapshots sonatype @@ -82,15 +82,20 @@ placeholderapi - http://repo.extendedclip.com/content/repositories/placeholderapi/ + https://repo.extendedclip.com/content/repositories/placeholderapi/ + + + maven_central + Maven Central + https://repo.maven.apache.org/maven2/ - net.pl3x.purpur + org.purpurmc.purpur purpur-api - 1.16.2-R0.1-SNAPSHOT + 1.20.6-R0.1-SNAPSHOT provided @@ -102,19 +107,19 @@ org.bstats bstats-bukkit - 1.7 + 3.0.2 compile me.clip placeholderapi - 2.10.6 + 2.11.6 provided - net.zrips - cmi-api - 7.6.2.0 + CMI-API + CMI-API + 9.7.0.8 provided diff --git a/src/main/java/com/luffbox/smoothsleep/lib/ConfigHelper.java b/src/main/java/com/luffbox/smoothsleep/lib/ConfigHelper.java index 0cfa6bb..e4d0003 100644 --- a/src/main/java/com/luffbox/smoothsleep/lib/ConfigHelper.java +++ b/src/main/java/com/luffbox/smoothsleep/lib/ConfigHelper.java @@ -37,13 +37,13 @@ public class ConfigHelper { private final ConfigHelper conf; public Map worlds = new HashMap<>(); - public static Set negativeEffects = Stream.of(BLINDNESS, CONFUSION, HARM, HUNGER, LEVITATION, - POISON, SLOW, SLOW_DIGGING, UNLUCK, WEAKNESS, WITHER, UNLUCK).collect(Collectors.toSet()); - public static Set positiveEffects = Stream.of(ABSORPTION, DAMAGE_RESISTANCE, FAST_DIGGING, - FIRE_RESISTANCE, GLOWING, HEAL, HEALTH_BOOST, INCREASE_DAMAGE, INVISIBILITY, JUMP, NIGHT_VISION, + public static Set negativeEffects = Stream.of(BLINDNESS, NAUSEA, INSTANT_DAMAGE, HUNGER, LEVITATION, + POISON, SLOWNESS, MINING_FATIGUE, UNLUCK, WEAKNESS, WITHER, UNLUCK).collect(Collectors.toSet()); + public static Set positiveEffects = Stream.of(ABSORPTION, RESISTANCE, HASTE, + FIRE_RESISTANCE, GLOWING, INSTANT_HEALTH, HEALTH_BOOST, STRENGTH, INVISIBILITY, JUMP_BOOST, NIGHT_VISION, REGENERATION, SATURATION, SPEED, WATER_BREATHING, LUCK).collect(Collectors.toSet()); - public static Set requiresData = Stream.of(REDSTONE, BLOCK_CRACK, BLOCK_DUST, FALLING_DUST, ITEM_CRACK, - SPELL_MOB, SPELL_MOB_AMBIENT).collect(Collectors.toSet()); + public static Set requiresData = Stream.of(DUST, BLOCK, DUST_PILLAR, FALLING_DUST, ITEM, + WITCH, BLOCK_MARKER, SHRIEK, SCULK_CHARGE, VIBRATION, DUST_COLOR_TRANSITION, ENTITY_EFFECT).collect(Collectors.toSet()); public static boolean firstRun; private static String validBarColors, validBarStyles, validParticlePatternTypes; diff --git a/src/main/java/com/luffbox/smoothsleep/lib/MiscUtils.java b/src/main/java/com/luffbox/smoothsleep/lib/MiscUtils.java index f9b3621..c75a918 100644 --- a/src/main/java/com/luffbox/smoothsleep/lib/MiscUtils.java +++ b/src/main/java/com/luffbox/smoothsleep/lib/MiscUtils.java @@ -1,7 +1,7 @@ package com.luffbox.smoothsleep.lib; import com.luffbox.smoothsleep.SmoothSleep; -import org.apache.commons.lang.text.StrSubstitutor; +import org.apache.commons.lang3.text.StrSubstitutor; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.World; From 7af62aa79ea787bdab6674014e5eceaa140fcc4f Mon Sep 17 00:00:00 2001 From: LOOHP Date: Sat, 1 Jun 2024 21:08:47 +0100 Subject: [PATCH 2/3] sleepCounter field name changed --- src/main/java/com/luffbox/smoothsleep/PlayerData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/luffbox/smoothsleep/PlayerData.java b/src/main/java/com/luffbox/smoothsleep/PlayerData.java index b9e125c..e5b5dbf 100644 --- a/src/main/java/com/luffbox/smoothsleep/PlayerData.java +++ b/src/main/java/com/luffbox/smoothsleep/PlayerData.java @@ -250,7 +250,7 @@ private String subStr(String template) { public void setSleepTicks(long ticks) { try { Object nmsPlr = ReflectUtil.invokeMethod(plr, "getHandle"); - ReflectUtil.setValue(nmsPlr, false, "sleepTicks", (int) ticks); + ReflectUtil.setValue(nmsPlr, false, "sleepCounter", (int) ticks); } catch (Exception e) { e.printStackTrace(); } } } From 62b6d003dec4591ed101e850c1fe92536893650b Mon Sep 17 00:00:00 2001 From: BlackCatTB <31024398+BlackCatTB@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:01:30 +0200 Subject: [PATCH 3/3] Update config.yml fixed type from VILLAGER_HAPPY -> HAPPY_VILLAGER --- src/main/resources/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 9696c90..1e0cb56 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -19,7 +19,7 @@ worlds: heal-slept-villagers: true morning-sound: 'ENTITY_PLAYER_LEVELUP' morning-particle-options: - particle: 'VILLAGER_HAPPY' + particle: 'HAPPY_VILLAGER' amount: 20 radius: 0.5 enabled: true @@ -69,4 +69,4 @@ worlds: show-if-awake: true color: 'BLUE' style: 'SOLID' - title: '&a{SLEEPERS}/{TOTAL} Sleeping &3- &b{12H}:{MIN} {MER_UPPER}' \ No newline at end of file + title: '&a{SLEEPERS}/{TOTAL} Sleeping &3- &b{12H}:{MIN} {MER_UPPER}'