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

Release v1.0.0 #23

Merged
merged 41 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4658dba
Setup addon workspace
RappyTV Jan 23, 2025
ca09dea
Implement nametag displaying friend notes
JarDateien Jan 23, 2025
3f666a6
Implement player note tag subconfig
RappyTV Jan 24, 2025
02dba0c
Add parent switch for note nametag
RappyTV Jan 24, 2025
dc7dc47
Implement basic labychat event functionality
JarDateien Jan 25, 2025
982b679
Fix config option and add translations
RappyTV Jan 25, 2025
3352d48
Rework events, add translations, add prefix
RappyTV Jan 25, 2025
9ac3c80
Add command with join functionality
RappyTV Jan 25, 2025
df8b2a5
Add switch settings to toggle server switch and status update messages
RappyTV Jan 28, 2025
c999ae7
Implement friend requests in chat with accept and decline interactions
RappyTV Jan 28, 2025
17b806c
Add a config option to toggle friend request notifications
RappyTV Jan 28, 2025
9bb8ca9
Improve server state update notifications
RappyTV Jan 28, 2025
ab6827e
Implement interaction bullets
JarDateien Feb 6, 2025
cc606d0
Add config options for interaction bullets
JarDateien Feb 6, 2025
fa23e42
Merge pull request #10 from RappyLabyAddons/feat/interaction-bullets
JarDateien Feb 6, 2025
769f4e6
Add notifications for labychat messages
RappyTV Feb 6, 2025
f616166
Merge branch 'development' into feat/chat-events
RappyTV Feb 6, 2025
9f2d4d1
Merge pull request #12 from RappyLabyAddons/feat/chat-events
RappyTV Feb 6, 2025
e4441f7
Reconnect voicechat on friend add
JarDateien Feb 6, 2025
f798b94
Add option to toggle voicechat restarts
JarDateien Feb 6, 2025
eba5e2d
Fix bullets being visible when addon is disabled
JarDateien Feb 6, 2025
3f7c592
Merge pull request #13 from RappyLabyAddons/feat/voicechat-restart
RappyTV Feb 6, 2025
6373aba
Implement automatic friend request reaction
JarDateien Feb 6, 2025
684be1b
Merge pull request #14 from RappyLabyAddons/feat/automatic-friend-req…
RappyTV Feb 6, 2025
98322c5
Add pin icon and badge for pinned friends
RappyTV Feb 6, 2025
fec3a26
Merge pull request #15 from RappyLabyAddons/feat/pinned-friend-icon
RappyTV Feb 6, 2025
00d5c4e
Implement, register and translate hud widgets and hud widget category
RappyTV Feb 10, 2025
7f35238
Merge pull request #19 from RappyLabyAddons/feat/hud-widgets
RappyTV Feb 10, 2025
5fab576
Add description to restartWhenMuted option
RappyTV Feb 10, 2025
7410fa0
Implement different textures for pin icon
RappyTV Feb 10, 2025
6248375
Add icons to interaction bullets
RappyTV Feb 10, 2025
e6c6233
Add config option for the prefix color, add some more config descript…
RappyTV Feb 26, 2025
1561263
Merge pull request #22 from RappyLabyAddons/feat/customization
RappyTV Feb 26, 2025
3b16271
Add addon description
RappyTV Feb 27, 2025
c4acc66
Rearrange two config options
RappyTV Feb 27, 2025
656e556
Add more descriptions to some config options
RappyTV Feb 27, 2025
cb1c075
Add option to receive messages when an outgoing friend request gets d…
RappyTV Feb 27, 2025
985a845
Remove useless texture picker for pin icon
RappyTV Feb 27, 2025
9dc46dd
Add configuration icons
RappyTV Feb 27, 2025
68578d6
Add addon icon
RappyTV Feb 27, 2025
a27e4d0
Disable note editor bullet until it's fixed
RappyTV Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,27 @@ group = "org.example"
version = providers.environmentVariable("VERSION").getOrElse("1.0.0")

labyMod {
defaultPackageName = "org.example" //change this to your main package name (used by all modules)
defaultPackageName = "com.rappytv.betterfriends"

minecraft {
registerVersion(versions.toTypedArray()) {
runs {
getByName("client") {
// When the property is set to true, you can log in with a Minecraft account
// devLogin = true
devLogin = true
}
}
}
}

addonInfo {
namespace = "example"
displayName = "ExampleAddon"
author = "Example Author"
description = "Example Description"
namespace = "betterfriends"
displayName = "BetterFriends"
author = "RappyTV, JarDateien"
description = "All-in-one addon packed with advanced features for your LabyChat friends."
minecraftVersion = "*"
version = rootProject.version.toString()

addon("voicechat", true)
}
}

Expand Down
107 changes: 107 additions & 0 deletions core/src/main/java/com/rappytv/betterfriends/BetterFriendsAddon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
package com.rappytv.betterfriends;

import com.rappytv.betterfriends.command.BetterFriendsCommand;
import com.rappytv.betterfriends.config.BetterFriendsConfig;
import com.rappytv.betterfriends.interactions.FriendNoteEditorBullet;
import com.rappytv.betterfriends.interactions.FriendTogglePinBullet;
import com.rappytv.betterfriends.listeners.ChatReceiveListener;
import com.rappytv.betterfriends.listeners.FriendAddListener;
import com.rappytv.betterfriends.listeners.FriendRemoveListener;
import com.rappytv.betterfriends.listeners.FriendRequestReceiveListener;
import com.rappytv.betterfriends.listeners.FriendRequestRemoveListener;
import com.rappytv.betterfriends.listeners.FriendServerStateListener;
import com.rappytv.betterfriends.listeners.FriendStatusUpdateListener;
import com.rappytv.betterfriends.listeners.LabyChatReceiveListener;
import com.rappytv.betterfriends.ui.badge.FriendPinBadge;
import com.rappytv.betterfriends.ui.hud.FriendCountHudWidget;
import com.rappytv.betterfriends.ui.hud.IncomingFriendRequestCountHudWidget;
import com.rappytv.betterfriends.ui.hud.OnlineFriendCountHudWidget;
import com.rappytv.betterfriends.ui.hud.UnreadChatCountWidget;
import com.rappytv.betterfriends.ui.tags.FriendNoteNameTag;
import com.rappytv.betterfriends.ui.tags.FriendPinIconTag;
import net.labymod.api.Laby;
import net.labymod.api.addon.LabyAddon;
import net.labymod.api.client.component.Component;
import net.labymod.api.client.component.TextComponent;
import net.labymod.api.client.component.format.NamedTextColor;
import net.labymod.api.client.component.format.TextColor;
import net.labymod.api.client.component.format.TextDecoration;
import net.labymod.api.client.component.serializer.legacy.LegacyComponentSerializer;
import net.labymod.api.client.entity.player.tag.PositionType;
import net.labymod.api.client.gui.hud.binding.category.HudWidgetCategory;
import net.labymod.api.models.addon.annotation.AddonMain;

@AddonMain
public class BetterFriendsAddon extends LabyAddon<BetterFriendsConfig> {

private final LegacyComponentSerializer serializer = LegacyComponentSerializer.legacyAmpersand();
private static BetterFriendsAddon instance;

@Override
protected void enable() {
instance = this;
this.registerSettingCategory();

this.registerCommand(new BetterFriendsCommand());

this.registerListener(new ChatReceiveListener(this));
this.registerListener(new FriendAddListener(this));
this.registerListener(new FriendRemoveListener(this));
this.registerListener(new FriendRequestReceiveListener(this));
this.registerListener(new FriendRequestRemoveListener(this));
this.registerListener(new FriendServerStateListener(this));
this.registerListener(new FriendStatusUpdateListener(this));
this.registerListener(new LabyChatReceiveListener(this));

this.labyAPI().interactionMenuRegistry().register(new FriendNoteEditorBullet(this));
this.labyAPI().interactionMenuRegistry().register(new FriendTogglePinBullet(this));

HudWidgetCategory category = new HudWidgetCategory(this, "widgets");
this.labyAPI().hudWidgetRegistry().categoryRegistry().register(category);
this.labyAPI().hudWidgetRegistry().register(new FriendCountHudWidget(category));
this.labyAPI().hudWidgetRegistry().register(new IncomingFriendRequestCountHudWidget(category));
this.labyAPI().hudWidgetRegistry().register(new OnlineFriendCountHudWidget(category));
this.labyAPI().hudWidgetRegistry().register(new UnreadChatCountWidget(category));

for (PositionType position : PositionType.values()) {
this.labyAPI().tagRegistry().registerBefore(
"labymod_role",
"betterfriends_friend_note",
position,
new FriendNoteNameTag(this, position)
);
}
this.labyAPI().tagRegistry().registerBefore(
"VoiceTag",
"betterfriends_pin_icon",
PositionType.RIGHT_TO_NAME,
new FriendPinIconTag(this)
);
Laby.references().badgeRegistry().registerBefore(
"VoiceBadge",
"betterfriends_pin_badge",
net.labymod.api.client.entity.player.badge.PositionType.RIGHT_TO_NAME,
new FriendPinBadge(this)
);
}

@Override
protected Class<? extends BetterFriendsConfig> configurationClass() {
return BetterFriendsConfig.class;
}

public static TextComponent getPrefix() {
return Component.empty()
.append(Component.text(
"BF",
TextColor.color(instance.configuration().prefixColor().get().get())
).decorate(TextDecoration.BOLD))
.append(Component.space())
.append(Component.text("»", NamedTextColor.DARK_GRAY))
.append(Component.space());
}

public LegacyComponentSerializer getSerializer() {
return this.serializer;
}
}
Loading