diff --git a/Client/src/main/java/de/com/baseband/client/Setup.java b/Client/src/main/java/de/com/baseband/client/Setup.java index da48be3..9911f38 100644 --- a/Client/src/main/java/de/com/baseband/client/Setup.java +++ b/Client/src/main/java/de/com/baseband/client/Setup.java @@ -66,6 +66,7 @@ public class Setup { new Spotify(), new Test(), new Timer(), + new Toggle(), new TPAccept(), new Trigger(), new Trust(), diff --git a/Client/src/main/java/de/com/baseband/client/feature/command/Toggle.java b/Client/src/main/java/de/com/baseband/client/feature/command/Toggle.java new file mode 100644 index 0000000..7d6efdb --- /dev/null +++ b/Client/src/main/java/de/com/baseband/client/feature/command/Toggle.java @@ -0,0 +1,31 @@ +package de.com.baseband.client.feature.command; + +import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.feature.client.Client; +import de.com.baseband.client.util.interact.Chat; + +@Command +public class Toggle extends Feature { + + @Override + public void onCommand(String[] args) { + if(args.length != 1) { + Chat.print("Syntax: " + Client.prefix + this + " "); + return; + } + for (Feature feature : Features.features) { + if(feature.toString().equalsIgnoreCase(args[0])) { + feature.toggle(); + return; + } + } + Chat.print("Toggled!"); + } + + @Override + public String toString() { + return "T"; + } +}