improve bot options? mabe mabe

This commit is contained in:
Chayapak 2023-04-23 07:24:12 +07:00
parent 86c9085f1d
commit 7eeec7ca00
9 changed files with 239 additions and 117 deletions

124
.idea/uiDesigner.xml Normal file
View file

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View file

@ -4,7 +4,16 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="50f184fa-7bed-4956-baf5-7586ff26ea08" name="Changes" comment="make better console logging like the old js chomens bot" />
<list default="true" id="50f184fa-7bed-4956-baf5-7586ff26ea08" name="Changes" comment="probably lazy fix the sus">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Bot.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Configuration.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CorePlugin.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/SelfCarePlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/SelfCarePlugin.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/TrustedPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/TrustedPlugin.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -34,26 +43,26 @@
</option>
</component>
<component name="ProblemsViewState">
<option name="selectedTabId" value="CurrentFile" />
<option name="selectedTabId" value="ProjectErrors" />
</component>
<component name="ProjectId" id="2NljChrU0rNqQmqh8CSQG0gdKNt" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "master",
"jdk.selected.JAVA_MODULE": "17",
"last_opened_file_path": "/home/chayapak1/IdeaProjects/chomens-bot-java",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.0",
"settings.editor.selected.configurable": "preferences.keymap"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;jdk.selected.JAVA_MODULE&quot;: &quot;17&quot;,
&quot;last_opened_file_path&quot;: &quot;/home/chayapak1/IdeaProjects/chomens-bot-java&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.keymap&quot;
}
}]]></component>
}</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/.idea" />
@ -95,55 +104,6 @@
<option name="presentableId" value="Default" />
<updated>1680245437032</updated>
</task>
<task id="LOCAL-00049" summary="among">
<created>1681287412000</created>
<option name="number" value="00049" />
<option name="presentableId" value="LOCAL-00049" />
<option name="project" value="LOCAL" />
<updated>1681287412000</updated>
</task>
<task id="LOCAL-00050" summary="actually make more notes play (but mabe worse pitch idk)">
<created>1681367090767</created>
<option name="number" value="00050" />
<option name="presentableId" value="LOCAL-00050" />
<option name="project" value="LOCAL" />
<updated>1681367090770</updated>
</task>
<task id="LOCAL-00051" summary="i forgor to among us">
<created>1681367264222</created>
<option name="number" value="00051" />
<option name="presentableId" value="LOCAL-00051" />
<option name="project" value="LOCAL" />
<updated>1681367264222</updated>
</task>
<task id="LOCAL-00052" summary="i forgor nbs converter">
<created>1681372930407</created>
<option name="number" value="00052" />
<option name="presentableId" value="LOCAL-00052" />
<option name="project" value="LOCAL" />
<updated>1681372930407</updated>
</task>
<task id="LOCAL-00053" summary="make it better or worse">
<created>1681439228534</created>
<option name="number" value="00053" />
<option name="presentableId" value="LOCAL-00053" />
<option name="project" value="LOCAL" />
<updated>1681439228535</updated>
</task>
<task id="LOCAL-00054" summary="add stuff fix stuff improve stuff">
<created>1681454086491</created>
<option name="number" value="00054" />
<option name="presentableId" value="LOCAL-00054" />
<option name="project" value="LOCAL" />
<updated>1681454086491</updated>
</task>
<task id="LOCAL-00055" summary="remove debug line and fix pitch issue.,,.">
<created>1681455582686</created>
<option name="number" value="00055" />
<option name="presentableId" value="LOCAL-00055" />
<option name="project" value="LOCAL" />
<updated>1681455582686</updated>
</task>
<task id="LOCAL-00056" summary="fix filename real l l l">
<created>1681457880562</created>
<option name="number" value="00056" />
@ -438,7 +398,56 @@
<option name="project" value="LOCAL" />
<updated>1682142828982</updated>
</task>
<option name="localTasksCounter" value="98" />
<task id="LOCAL-00098" summary="fart !!!!">
<created>1682164566394</created>
<option name="number" value="00098" />
<option name="presentableId" value="LOCAL-00098" />
<option name="project" value="LOCAL" />
<updated>1682164566394</updated>
</task>
<task id="LOCAL-00099" summary="sex">
<created>1682167370618</created>
<option name="number" value="00099" />
<option name="presentableId" value="LOCAL-00099" />
<option name="project" value="LOCAL" />
<updated>1682167370618</updated>
</task>
<task id="LOCAL-00100" summary="probably improve logquery?">
<created>1682168732774</created>
<option name="number" value="00100" />
<option name="presentableId" value="LOCAL-00100" />
<option name="project" value="LOCAL" />
<updated>1682168732774</updated>
</task>
<task id="LOCAL-00101" summary="forgor to set the thread to null">
<created>1682169054135</created>
<option name="number" value="00101" />
<option name="presentableId" value="LOCAL-00101" />
<option name="project" value="LOCAL" />
<updated>1682169054135</updated>
</task>
<task id="LOCAL-00102" summary="log exception for funni?">
<created>1682169510400</created>
<option name="number" value="00102" />
<option name="presentableId" value="LOCAL-00102" />
<option name="project" value="LOCAL" />
<updated>1682169510400</updated>
</task>
<task id="LOCAL-00103" summary="fart?!?!?!">
<created>1682169836895</created>
<option name="number" value="00103" />
<option name="presentableId" value="LOCAL-00103" />
<option name="project" value="LOCAL" />
<updated>1682169836895</updated>
</task>
<task id="LOCAL-00104" summary="probably lazy fix the sus">
<created>1682170080224</created>
<option name="number" value="00104" />
<option name="presentableId" value="LOCAL-00104" />
<option name="project" value="LOCAL" />
<updated>1682170080224</updated>
</task>
<option name="localTasksCounter" value="105" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -453,13 +462,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="i forgor to remove the code i copied from my chipmunkbot fork" />
<MESSAGE value="probably fix greplog but more mess,...." />
<MESSAGE value="this is why you should test the code before commiting" />
<MESSAGE value="add icu self care&#10;i control uwu uwuw uw uwu wu" />
<MESSAGE value="i forgor to commit bot" />
<MESSAGE value="add kick !!!!" />
<MESSAGE value="actually probably fix thing (it kick others)" />
<MESSAGE value="FINALLY FIX EXTRA COLOR PARSING LETS GOOOOOOO&#10;messy code but whatever,..,.," />
<MESSAGE value="what the fuck i commited the wrong file" />
<MESSAGE value="mabe" />
@ -478,7 +480,14 @@
<MESSAGE value="change a bit mabe" />
<MESSAGE value="improve reconnect i guess" />
<MESSAGE value="make better console logging like the old js chomens bot" />
<option name="LAST_COMMIT_MESSAGE" value="make better console logging like the old js chomens bot" />
<MESSAGE value="fart !!!!" />
<MESSAGE value="sex" />
<MESSAGE value="probably improve logquery?" />
<MESSAGE value="forgor to set the thread to null" />
<MESSAGE value="log exception for funni?" />
<MESSAGE value="fart?!?!?!" />
<MESSAGE value="probably lazy fix the sus" />
<option name="LAST_COMMIT_MESSAGE" value="probably lazy fix the sus" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />

View file

@ -23,15 +23,13 @@ public class Bot {
@Getter private final String host;
@Getter private final int port;
private final String _username;
@Getter private final boolean kaboom;
@Getter private final String serverName;
@Getter @Setter private boolean useCore;
@Getter @Setter private boolean useChat;
@Getter private final boolean hasEssentials;
@Getter private final List<Bot> allBots;
@Getter private final Configuration.BotOption options;
@Getter private final Configuration config;
@Getter private List<Bot> allBots;
@Getter private String username;
@Getter public Session session;
@ -65,16 +63,14 @@ public class Bot {
@Getter private MazePlugin maze;
@Getter private ExploitsPlugin exploits;
public Bot (String host, int port, String _username, boolean kaboom, String serverName, boolean useCore, boolean useChat, boolean hasEssentials, List<Bot> allBots, Configuration config) {
this.host = host;
this.port = port;
this._username = _username;
this.kaboom = kaboom;
this.serverName = serverName;
this.useCore = useCore;
this.useChat = useChat;
this.hasEssentials = hasEssentials;
public Bot (Configuration.BotOption botOption, List<Bot> allBots, Configuration config) {
this.host = botOption.host;
this.port = botOption.port;
this.options = botOption;
this.allBots = allBots;
this.config = config;
ConsolePlugin.addListener(new ConsolePlugin.Listener() {
@ -111,6 +107,8 @@ public class Bot {
}
public void reconnect () {
final String _username = options.username();
if (_username == null) username = RandomStringUtils.randomAlphabetic(8);
else username = _username;

View file

@ -26,7 +26,7 @@ public class Configuration {
@Getter public List<String> trusted = new ArrayList<>();
@Getter public SelfCare selfCare = new SelfCare();
@Getter public Bots[] bots = new Bots[]{};
@Getter public BotOption[] bots = new BotOption[]{};
public static class Core {
@Getter public int layers = 3;
@ -73,7 +73,7 @@ public class Configuration {
@Getter public int positionPacketsPerSecond = 10;
}
public static class Bots {
public static class BotOption {
@Getter public String host;
@Getter public int port;
@Getter public String username;

View file

@ -48,7 +48,7 @@ public class Main {
final Configuration config = _config;
Configuration.Bots[] botsOptions = config.bots();
Configuration.BotOption[] botsOptions = config.bots();
// idk if these should be here lol, but it is just the discord stuff
JDA jda = null;
@ -64,17 +64,8 @@ public class Main {
System.exit(1);
}
for (Configuration.Bots botOption : botsOptions) {
final String host = botOption.host();
final int port = botOption.port();
final String username = botOption.username();
final boolean kaboom = botOption.kaboom();
final String serverName = botOption.serverName();
final boolean useCore = botOption.useCore();
final boolean useChat = botOption.useChat();
final boolean hasEssentials = botOption.hasEssentials();
final Bot bot = new Bot(host, port, username, kaboom, serverName, useCore, useChat, hasEssentials, allBots, config);
for (Configuration.BotOption botOption : botsOptions) {
final Bot bot = new Bot(botOption, allBots, config);
allBots.add(bot);
}

View file

@ -181,7 +181,7 @@ public class ChatPlugin extends SessionAdapter {
}
public void tellraw (Component component, String targets) {
if (bot.useChat()) {
if (bot.options().useChat()) {
if (!targets.equals("@a")) return; // worst fix of all time!1!
final String stringified = ComponentUtilities.stringifyMotd(component).replace("§", "&");

View file

@ -54,7 +54,7 @@ public class CorePlugin extends PositionPlugin.PositionListener {
public CorePlugin (Bot bot) {
this.bot = bot;
this.kaboom = bot.kaboom();
this.kaboom = bot.options().kaboom();
bot.position().addListener(this);
@ -78,7 +78,7 @@ public class CorePlugin extends PositionPlugin.PositionListener {
public void run (String command) {
if (!ready) return;
if (bot.useCore()) {
if (bot.options().useCore()) {
bot.session().send(new ServerboundSetCommandBlockPacket(
absoluteCorePosition(),
command,

View file

@ -92,24 +92,24 @@ public class SelfCarePlugin extends SessionAdapter {
if (selfCares.gamemode() && gamemode != GameMode.CREATIVE) bot.chat().send("/minecraft:gamemode creative @s[type=player]");
else if (selfCares.op() && permissionLevel < 2) bot.chat().send("/minecraft:op @s[type=player]");
else if (selfCares.cspy() && !cspy && bot.kaboom()) bot.chat().send("/commandspy:commandspy on");
else if (selfCares.prefix() && !prefix && bot.kaboom()) bot.chat().send("/extras:prefix &8[&eChomeNS Bot&8]");
else if (selfCares.username() && !username && bot.kaboom()) bot.chat().send("/extras:username " + bot.username());
else if (selfCares.cspy() && !cspy && bot.options().kaboom()) bot.chat().send("/commandspy:commandspy on");
else if (selfCares.prefix() && !prefix && bot.options().kaboom()) bot.chat().send("/extras:prefix &8[&eChomeNS Bot&8]");
else if (selfCares.username() && !username && bot.options().kaboom()) bot.chat().send("/extras:username " + bot.username());
else if (selfCares.icu().enabled() && positionPacketsPerSecond > selfCares.icu().positionPacketsPerSecond()) bot.core().run("essentials:sudo * icu stop");
else if (selfCares.vanish() && !vanish && !visibility && bot.hasEssentials()) {
if (bot.useChat()) bot.chat().send("/essentials:vanish enable");
else if (selfCares.vanish() && !vanish && !visibility && bot.options().hasEssentials()) {
if (bot.options().useChat()) bot.chat().send("/essentials:vanish enable");
else bot.core().run("essentials:vanish " + bot.username() + " enable");
}
else if (selfCares.nickname() && !nickname && bot.hasEssentials()) {
if (bot.useChat()) bot.chat().send("/essentials:nickname off");
else if (selfCares.nickname() && !nickname && bot.options().hasEssentials()) {
if (bot.options().useChat()) bot.chat().send("/essentials:nickname off");
else bot.core().run("essentials:nickname " + bot.username() + " off");
}
else if (selfCares.socialspy() && !socialspy && bot.hasEssentials()) {
if (bot.useChat()) bot.chat().send("/essentials:socialspy enable");
else if (selfCares.socialspy() && !socialspy && bot.options().hasEssentials()) {
if (bot.options().useChat()) bot.chat().send("/essentials:socialspy enable");
else bot.core().run("essentials:socialspy " + bot.username() + " enable");
}
else if (selfCares.mute() && muted && bot.hasEssentials()) {
if (bot.useChat()) bot.chat().send("/essentials:mute " + bot.username());
else if (selfCares.mute() && muted && bot.options().hasEssentials()) {
if (bot.options().useChat()) bot.chat().send("/essentials:mute " + bot.username());
else bot.core().run("essentials:mute " + bot.username());
}
}

View file

@ -36,7 +36,7 @@ public class TrustedPlugin extends PlayersPlugin.PlayerListener {
final Component component = Component.translatable(
"[%s] [%s] %s",
Component.text("ChomeNS Bot").color(NamedTextColor.YELLOW),
Component.text(this.bot.serverName()).color(NamedTextColor.GRAY),
Component.text(this.bot.options().serverName()).color(NamedTextColor.GRAY),
message.color(NamedTextColor.WHITE)
).color(NamedTextColor.DARK_GRAY);