some among us lol

This commit is contained in:
Chayapak 2023-07-02 10:09:56 +07:00
parent 5eadb1c868
commit 6acc76171a
20 changed files with 31 additions and 63 deletions

View file

@ -6,9 +6,6 @@ import land.chipmunk.chayapak.chomens_bot.command.CommandContext;
import land.chipmunk.chayapak.chomens_bot.command.TrustLevel;
import net.kyori.adventure.text.Component;
import java.util.ArrayList;
import java.util.List;
public class BruhifyCommand extends Command {
public BruhifyCommand () {
super(

View file

@ -8,8 +8,6 @@ import land.chipmunk.chayapak.chomens_bot.command.CommandContext;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class ClearChatCommand extends Command {

View file

@ -20,30 +20,6 @@ public class ClearChatQueueCommand extends Command {
);
}
public String name() { return "clearchatqueue"; }
public String description() {
return "Clears the bot's chat queue";
}
public List<String> usage() {
final List<String> usages = new ArrayList<>();
usages.add("");
return usages;
}
public List<String> alias() {
final List<String> aliases = new ArrayList<>();
aliases.add("ccq");
return aliases;
}
public TrustLevel trustLevel() {
return TrustLevel.PUBLIC;
}
@Override
public Component execute(CommandContext context, String[] args, String[] fullArgs) {
final Bot bot = context.bot;

View file

@ -7,9 +7,6 @@ import land.chipmunk.chayapak.chomens_bot.command.TrustLevel;
import land.chipmunk.chayapak.chomens_bot.util.ColorUtilities;
import net.kyori.adventure.text.Component;
import java.util.ArrayList;
import java.util.List;
public class CreatorCommand extends Command {
public CreatorCommand () {
super(

View file

@ -7,7 +7,7 @@ import net.kyori.adventure.text.Component;
import java.util.UUID;
public class BossBar {
public UUID uuid;
public final UUID uuid;
public Component title;
public BossBarColor color;

View file

@ -1,9 +1,9 @@
package land.chipmunk.chayapak.chomens_bot.data;
public class FilteredPlayer {
public String playerName;
public boolean regex;
public boolean ignoreCase;
public final String playerName;
public final boolean regex;
public final boolean ignoreCase;
public FilteredPlayer (
String playerName,

View file

@ -1,11 +1,11 @@
package land.chipmunk.chayapak.chomens_bot.data;
public class Mail {
public String sentBy;
public String sentTo;
public long timeSent;
public String server;
public String contents;
public final String sentBy;
public final String sentTo;
public final long timeSent;
public final String server;
public final String contents;
public Mail (
String sentBy,

View file

@ -8,13 +8,13 @@ import net.kyori.adventure.text.Component;
import java.security.PublicKey;
public class MutablePlayerListEntry {
public GameProfile profile;
public final GameProfile profile;
public GameMode gamemode;
public int latency;
public Component displayName;
public long expiresAt;
public final long expiresAt;
public PublicKey publicKey;
public byte[] keySignature;
public final byte[] keySignature;
public boolean listed;
public MutablePlayerListEntry (

View file

@ -22,9 +22,9 @@ public class BossbarManagerPlugin extends Bot.Listener {
public final Map<UUID, BossBar> serverBossBars = new HashMap<>();
private final Map<UUID, BotBossBar> bossBars = new HashMap<>();
public boolean enabled = true;
public final boolean enabled = true;
public String bossBarPrefix = "chomens_bot:";
public final String bossBarPrefix = "chomens_bot:";
public BossbarManagerPlugin (Bot bot) {
this.bot = bot;

View file

@ -41,7 +41,7 @@ public class ChatPlugin extends Bot.Listener {
private final List<String> queue = new ArrayList<>();
public int queueDelay;
public final int queueDelay;
private final List<Listener> listeners = new ArrayList<>();

View file

@ -22,7 +22,7 @@ public class CommandHandlerPlugin {
public final List<Command> commands = new ArrayList<>();
public boolean disabled = false;
public final boolean disabled = false;
public CommandHandlerPlugin (Bot bot) {
this.bot = bot;

View file

@ -12,7 +12,7 @@ import java.util.List;
public class CommandSuggestionPlugin extends ChatPlugin.Listener {
private final Bot bot;
public String id = "chomens_bot_command_suggestion";
public final String id = "chomens_bot_command_suggestion";
public CommandSuggestionPlugin (Bot bot) {
this.bot = bot;

View file

@ -29,7 +29,7 @@ import java.util.List;
// please ignore my ohio code
// also this is one of the classes which has >100 lines or actually >300 LMAO
public class DiscordPlugin {
public JDA jda;
public final JDA jda;
public final Map<String, String> servers;

View file

@ -16,7 +16,7 @@ public class LoggerPlugin extends ChatPlugin.Listener {
private boolean addedListener = false;
public boolean logToConsole = true;
public final boolean logToConsole = true;
private final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss");

View file

@ -29,7 +29,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
}
public Song currentSong;
public List<Song> songQueue = new ArrayList<>();
public final List<Song> songQueue = new ArrayList<>();
public SongLoaderRunnable loaderThread;
public Loop loop = Loop.OFF;

View file

@ -11,7 +11,7 @@ import java.nio.charset.StandardCharsets;
// normally unused in the main instance of the bot
public class PacketSnifferPlugin extends Bot.Listener {
public boolean enabled = false;
public final boolean enabled = false;
private OutputStreamWriter writer;

View file

@ -158,7 +158,7 @@ public class SelfCarePlugin extends Bot.Listener {
final GameEvent notification = packet.getNotification();
final GameEventValue value = packet.getValue();
if (notification == GameEvent.ENTER_CREDITS) {
if (notification == GameEvent.ENTER_CREDITS && bot.config.selfCare.endCredits) {
bot.session.send(new ServerboundClientCommandPacket(ClientCommand.RESPAWN));
return;
}

View file

@ -70,9 +70,9 @@ public class TPSPlugin extends Bot.Listener {
}
private void updateTPSBar () {
try {
if (!enabled) return;
try {
final double tickRate = getTickRate();
final DecimalFormat formatter = new DecimalFormat("##.##");

View file

@ -2,12 +2,12 @@ package land.chipmunk.chayapak.chomens_bot.song;
// Author: hhhzzzsss
public class Note implements Comparable<Note> {
public Instrument instrument;
public int pitch;
public float volume;
public long time;
public int panning;
public int stereo;
public final Instrument instrument;
public final int pitch;
public final float volume;
public final long time;
public final int panning;
public final int stereo;
public Note (
Instrument instrument,

View file

@ -62,7 +62,7 @@ public class ComponentUtilities {
ansiMap.put("r", "\u001b[0m");
}
private static record PartiallyStringifiedOutput (
private record PartiallyStringifiedOutput (
String output,
String lastColor
) {}