Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MicrocontrollersDev committed Jun 26, 2024
2 parents 049f271 + 607b4e1 commit 2005012
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ you would want while on Hypixel, including Colored Beds, Height Overlay, Chat Me

### General
- **Auto Start** - Join Hypixel immediately once the client has loaded to the main menu.
- **Auto Queue** - Automatically queues for another game once you win or die. (This will require you to interact with the game in a way to prevent abuse)
- **Auto-Complete Play Commands** - Allows tab completion of /play commands.
- **Auto Queue** - Automatically queues for another game once you win or die. (This will require you to interact with the game in a way to prevent abuse)
- **Limbo Play Helper** - When a /play command is run in Limbo, this runs /l first and then the command.
- **Automatically Check GEXP** - Automatically check your GEXP after you win a Hypixel game.
- **Automatically Check Winstreak** - Automatically check your winstreak after you win a Hypixel game.
Expand All @@ -22,6 +22,10 @@ you would want while on Hypixel, including Colored Beds, Height Overlay, Chat Me
<summary>Chat</summary>

### Chat
- **Auto GG** - Send a "gg" message at the end of a game.
- **Auto GG Second Message** - Enable a secondary message to send after your first GG.
- **Casual Auto GG** - Send a "gg" message at the end of minigames/events that don't give out Karma, such as SkyBlock and The Pit events.
- **Anti GG** - Remove GG messages from chat.
- **Auto GL** - Send a message 5 seconds before a Hypixel game starts.
- **Anti GL** - Remove all GL messages from chat.
- **Auto Friend** - Automatically accept friend requests.
Expand Down Expand Up @@ -49,6 +53,7 @@ you would want while on Hypixel, including Colored Beds, Height Overlay, Chat Me
- **Thank Watchdog** - Compliment Watchdog when someone is banned, or a Watchdog announcement is sent.
- **Shout Cooldown** - Show the amount of time remaining until /shout can be reused.
- **Non Speech Cooldown** - Show the amount of time remaining until you can speak if you are a non.
- **Remove Karma Messages** - Remove Karma messages from the chat.
- **Hide Locraw Messages** - Hide locraw messages in chat.
- **Remove Lobby Statuses** - Remove lobby join messages from chat.
- **Remove Ticket Machine Rewards** - Remove ticket machine messages from chat and only show your own.
Expand Down Expand Up @@ -131,6 +136,24 @@ you would want while on Hypixel, including Colored Beds, Height Overlay, Chat Me
- **Hide Useless Lobby Nametags** - Hides unnecessary nametags such as those that say "RIGHT CLICK" or "CLICK TO PLAY" in a lobby, as well as other useless ones.
- **Hide Lobby Bossbars** - Hide the bossbar in the lobby.
- **Silent Lobby** - Prevent all sounds from playing when you are in a lobby.
- **Disable Stepping Sounds** - Remove sounds created by stepping.
- **Disable Slime Sounds** - Remove sounds created by slimes.
- **Disable Dragon Sounds** - Remove sounds created by dragons.
- **Disable Wither Sounds** - Remove sounds created by withers & wither skeletons.
- **Disable Item Pickup Sounds** - Remove sounds created by picking up an item.
- **Disable Experience Orb Sounds** - Remove sounds created by experience orbs.
- **Disable Primed TNT Sounds** - Remove sounds created by primed TNT.
- **Disable Explosion Sounds** - Remove sounds created by explosions.
- **Disable Delivery Man Sounds** - Remove sounds created by delivery man events.
- **Disable Note Block Sounds** - Remove sounds created by note blocks.
- **Disable Firework Sounds** - Remove sounds created by fireworks.
- **Disable Levelup Sounds** - Remove sounds created by someone leveling up.
- **Disable Arrow Sounds** - Remove sounds created by arrows.
- **Disable Bat Sounds** - Remove sounds created by bats.
- **Disable Fire Sounds** - Remove sounds created by fire.
- **Disable Enderman Sounds** - Remove sounds created by endermen.
- **Disable Door Sounds** - Disable sounds caused by doors, trapdoors, and fence gates.
- **Disable Portal Sounds** - Disable sounds caused by nether portals.
- **Remove Limbo AFK Title** - Remove the AFK title when you get sent to limbo for being AFK.
- **Limbo Limiter** - While in Limbo, limit your framerate to reduce the load of the game on your computer.
- **Limbo PM Ding** - While in Limbo, play the ding sound if you get a PM. Currently, Hypixel's option does not work in Limbo.
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/polyfrost/hytils/config/HytilsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public class HytilsConfig extends Config {
category = "Chat", subcategory = "Automatic",
min = 0, max = 5
)
public static int autoGGFirstPhraseDelay = 1;
public static float autoGGFirstPhraseDelay = 1;

@Dropdown(
name = "Auto GG Second Message",
Expand All @@ -192,7 +192,7 @@ public class HytilsConfig extends Config {
category = "Chat", subcategory = "Automatic",
min = 0, max = 5
)
public static int autoGGSecondPhraseDelay = 1;
public static float autoGGSecondPhraseDelay = 1;

@Switch(
name = "Auto GL",
Expand Down Expand Up @@ -1139,7 +1139,7 @@ public class HytilsConfig extends Config {

@Switch(
name = "Disable Note Block Sounds",
description = "Remove sounds created by Note Blocks.",
description = "Remove sounds created by note blocks.",
category = "Lobby", subcategory = "Sounds"
)
public static boolean lobbyDisableNoteBlockSounds;
Expand Down Expand Up @@ -1394,6 +1394,7 @@ public HytilsConfig() {
Sounds.DISABLE_STEP_SOUNDS) {
silentLobby = true;
lobbyDisableDoorSounds = true;
lobbyDisablePortalSounds = true;
}

if (modified) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ private static String getGGMessageTwo() {
public void onMessageReceived(@NotNull ClientChatReceivedEvent event) {
String message = EnumChatFormatting.getTextWithoutFormattingCodes(event.message.getUnformattedText());
if (!hasGameEnded(message)) return;
Multithreading.schedule(() -> UChat.say("/ac " + getGGMessageOne()), HytilsConfig.autoGGFirstPhraseDelay, TimeUnit.SECONDS);
Multithreading.schedule(() -> UChat.say("/ac " + getGGMessageOne()), (long) (HytilsConfig.autoGGFirstPhraseDelay * 1000), TimeUnit.MILLISECONDS);
if (HytilsConfig.autoGGSecondMessage)
Multithreading.schedule(() -> UChat.say("/ac " + getGGMessageTwo()), HytilsConfig.autoGGSecondPhraseDelay + HytilsConfig.autoGGFirstPhraseDelay, TimeUnit.SECONDS);
Multithreading.schedule(() -> UChat.say("/ac " + getGGMessageTwo()), (long) ((HytilsConfig.autoGGSecondPhraseDelay + HytilsConfig.autoGGFirstPhraseDelay) * 1000), TimeUnit.MILLISECONDS);
}

private boolean hasGameEnded(String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.polyfrost.hytils.mixin;

import cc.polyfrost.oneconfig.utils.hypixel.HypixelUtils;
import cc.polyfrost.oneconfig.utils.hypixel.LocrawUtil;
import org.polyfrost.hytils.HytilsReborn;
import org.polyfrost.hytils.config.HytilsConfig;
Expand All @@ -33,7 +34,7 @@ public abstract class BossStatusMixin_HideBossbar {
@Inject(method = "setBossStatus", at = @At("HEAD"), cancellable = true)
private static void hytils$cancelBossStatus(IBossDisplayData displayData, boolean hasColorModifierIn, CallbackInfo ci) {
if (displayData == null) return;
if (HytilsConfig.lobbyBossbar && !LocrawUtil.INSTANCE.isInGame() || HytilsConfig.gameAdBossbar && displayData.getDisplayName().getFormattedText().matches(HytilsReborn.INSTANCE.getLanguageHandler().getCurrent().gameBossbarAdvertisementRegex.pattern()))
if (HytilsConfig.lobbyBossbar && HypixelUtils.INSTANCE.isHypixel() && !LocrawUtil.INSTANCE.isInGame() || HytilsConfig.gameAdBossbar && displayData.getDisplayName().getFormattedText().matches(HytilsReborn.INSTANCE.getLanguageHandler().getCurrent().gameBossbarAdvertisementRegex.pattern()))
ci.cancel();
}
}

0 comments on commit 2005012

Please sign in to comment.