Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
import meteordevelopment.meteorclient.events.meteor.MouseClickEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.EnumSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.friends.Friend;
import meteordevelopment.meteorclient.systems.friends.Friends;
import meteordevelopment.meteorclient.systems.modules.Categories;
Expand Down Expand Up @@ -44,13 +41,21 @@ public class MiddleClickExtra extends Module {
);

private final Setting<Boolean> message = sgGeneral.add(new BoolSetting.Builder()
.name("message")
.description("Sends a message to the player when you add them as a friend.")
.name("send-message")
.description("Sends a message when you add a player as a friend.")
.defaultValue(false)
.visible(() -> mode.get() == Mode.AddFriend)
.build()
);

private final Setting<String> friendMessage = sgGeneral.add(new StringSetting.Builder()
.name("message-to-send")
.description("Message to send when you add a player as a friend (use %player for the player's name)")
.defaultValue("/msg %player I just friended you on Meteor.")
.visible(() -> mode.get() == Mode.AddFriend)
.build()
);

private final Setting<Boolean> quickSwap = sgGeneral.add(new BoolSetting.Builder()
.name("quick-swap")
.description("Allows you to use items in your inventory by simulating hotbar key presses. May get flagged by anticheats.")
Expand Down Expand Up @@ -109,7 +114,11 @@ private void onMouseClick(MouseClickEvent event) {
if (!Friends.get().isFriend(player)) {
Friends.get().add(new Friend(player));
info("Added %s to friends", player.getName().getString());
if (message.get()) ChatUtils.sendPlayerMsg("/msg " + player.getName() + " I just friended you on Meteor.");
if (message.get()) {
String messageNotify = friendMessage.get().replace("%player", player.getName().getString());
ChatUtils.sendPlayerMsg(messageNotify);
}

} else {
Friends.get().remove(Friends.get().get(player));
info("Removed %s from friends", player.getName().getString());
Expand Down