Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated nametag hiders #28

Merged
merged 5 commits into from May 13, 2022
Merged

Conversation

xthe-dev
Copy link
Member

@xthe-dev xthe-dev commented May 12, 2022

= changed Hide Useless SkyBlock Nametags to Hide Useless Game Nametags and added support for BedWars, SkyWars and (Bridge) Duels
= added support for WoolWars in GameStartingTitles
= updated some config names/descriptions
removed HideBridgeGoal Nametags

@MicrocontrollersDev
Copy link
Collaborator

lgtm except that if statement, i’ll simplify it down when i get the chance


@SubscribeEvent
public void onEntityRenderer(RenderLivingEvent.Pre<EntityLivingBase> event) {
final LocrawInformation locraw = HytilsReborn.INSTANCE.getLocrawUtil().getLocrawInformation();
if (HytilsConfig.hideUselessArmorStands && EssentialAPI.getMinecraftUtil().isHypixel() && HytilsReborn.INSTANCE.getLobbyChecker().playerIsInLobby() || (HytilsConfig.hideUselessArmorStandsSkyblock && locraw != null && locraw.getGameType() == GameType.SKYBLOCK)) {
if (HytilsConfig.hideUselessArmorStands && EssentialAPI.getMinecraftUtil().isHypixel() && HytilsReborn.INSTANCE.getLobbyChecker().playerIsInLobby() || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameType() == GameType.SKYBLOCK) || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameType() == GameType.BED_WARS) || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameType() == GameType.SKY_WARS) || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameMode().contains("BRIDGE"))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (HytilsConfig.hideUselessArmorStands && EssentialAPI.getMinecraftUtil().isHypixel() && HytilsReborn.INSTANCE.getLobbyChecker().playerIsInLobby() || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameType() == GameType.SKYBLOCK) || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameType() == GameType.BED_WARS) || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameType() == GameType.SKY_WARS) || (HytilsConfig.hideUselessArmorStandsGame && locraw != null && locraw.getGameMode().contains("BRIDGE"))) {
if (EssentialAPI.getMinecraftUtil().isHypixel() && locraw != null && (HytilsReborn.INSTANCE.getLobbyChecker().playerIsInLobby() && HytilsConfig.hideUselessArmorStands) || (HytilsConfig.hideUselessArmorStandsGame && (locraw.getGameType() == GameType.SKYBLOCK || locraw.getGameType() == GameType.BED_WARS || locraw.getGameType() == GameType.SKY_WARS || locraw.getGameMode().contains("BRIDGE"))) {

Did this in Notepad++ so not 100% sure if it's right, but I think it is. Regardless of where you are on Hypixel, you should always have a locraw, so might as well check that in the beginning and not have to check it for each individual locraw check. Then we can just group up the config option and all possible game(types/modes) together.

@MicrocontrollersDev
Copy link
Collaborator

also the list of nametags should probably be moved to datastorage but that doesn't have to happen in this pr

@MicrocontrollersDev
Copy link
Collaborator

if im not mistaken, with the current if statement, it wont work anywhere, since it's checking if the player is in the lobby and in one of the gametypes/modes. the lobby feature and game feature are part of the same && and need to be separated

@MicrocontrollersDev MicrocontrollersDev merged commit 9f4be1a into Polyfrost:master May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants