aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-17 17:40:44 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-17 17:40:44 +0200
commitce43d92584b785650b35d5a6ebdbfddd7d31661c (patch)
tree08d0cb94c13fc2dd5b2c6e550ff0faea0271346e /src/main/java/at/hannibal2/skyhanni/config
parentdae53e9abc14dde4fb193feace1424776b2535da (diff)
downloadskyhanni-ce43d92584b785650b35d5a6ebdbfddd7d31661c.tar.gz
skyhanni-ce43d92584b785650b35d5a6ebdbfddd7d31661c.tar.bz2
skyhanni-ce43d92584b785650b35d5a6ebdbfddd7d31661c.zip
mark players in chat
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Features.java12
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayers.java23
3 files changed, 36 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java
index 70307c9f4..3e5c4af7f 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Features.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java
@@ -8,7 +8,8 @@ import at.hannibal2.skyhanni.config.core.config.Position;
import at.hannibal2.skyhanni.config.core.config.annotations.Category;
import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor;
import at.hannibal2.skyhanni.config.features.*;
-import at.hannibal2.skyhanni.features.chat.PlayerChatFormatter;
+import at.hannibal2.skyhanni.features.MarkedPlayerManager;
+import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFormatter;
import com.google.gson.annotations.Expose;
import net.minecraft.client.Minecraft;
@@ -95,6 +96,11 @@ public class Features extends Config {
PlayerChatFormatter.Companion.testGuildChat();
return;
}
+
+ if (runnableId.equals("markOwnPlayer")) {
+ MarkedPlayerManager.toggleOwn();
+ return;
+ }
}
@Expose
@@ -146,6 +152,10 @@ public class Features extends Config {
public CommandsFeatures commands = new CommandsFeatures();
@Expose
+ @Category(name = "Marked Players", desc = "Players that got marked with /shmarkplayer")
+ public MarkedPlayers markedPlayers = new MarkedPlayers();
+
+ @Expose
@Category(name = "Misc", desc = "Settings without a category.")
public Misc misc = new Misc();
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java
index 460de1b7f..275a6eaaf 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.java
@@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.config.commands;
import at.hannibal2.skyhanni.SkyHanniMod;
import at.hannibal2.skyhanni.config.ConfigEditor;
import at.hannibal2.skyhanni.config.core.GuiScreenElementWrapper;
-import at.hannibal2.skyhanni.features.PlayerMarker;
+import at.hannibal2.skyhanni.features.MarkedPlayerManager;
import at.hannibal2.skyhanni.test.LorenzTest;
import at.hannibal2.skyhanni.test.command.CopyItemCommand;
import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand;
@@ -93,7 +93,7 @@ public class Commands {
"shmarkplayer",
new SimpleCommand.ProcessCommandRunnable() {
public void processCommand(ICommandSender sender, String[] args) {
- PlayerMarker.Companion.command(args);
+ MarkedPlayerManager.Companion.command(args);
}
}
)
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayers.java b/src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayers.java
new file mode 100644
index 000000000..7bff63e95
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/MarkedPlayers.java
@@ -0,0 +1,23 @@
+package at.hannibal2.skyhanni.config.features;
+
+import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorBoolean;
+import at.hannibal2.skyhanni.config.core.config.annotations.ConfigOption;
+import com.google.gson.annotations.Expose;
+
+public class MarkedPlayers {
+
+ @Expose
+ @ConfigOption(name = "Highlight in World", desc = "Highlight marked players in the world.")
+ @ConfigEditorBoolean
+ public boolean highlightInWorld = true;
+
+ @Expose
+ @ConfigOption(name = "Highlight in Chat", desc = "Highlight marked player names in chat.")
+ @ConfigEditorBoolean
+ public boolean highlightInChat = true;
+
+ @Expose
+ @ConfigOption(name = "Mark Own Name", desc = "Mark own player name.")
+ @ConfigEditorBoolean(runnableId = "markOwnPlayer")
+ public boolean markOwnName = false;
+}