
net.cassite.tofpcap.messages.ChatChannel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tof-pcap-java Show documentation
Show all versions of tof-pcap-java Show documentation
packet capture of Tower of Fantasy
The newest version!
package net.cassite.tofpcap.messages;
public enum ChatChannel {
WORLD(1),
TEAM(3),
GUILD(8),
COOP(9),
PRIVATE(16), // TODO i'm not sure about this
;
public final int num;
ChatChannel(int num) {
this.num = num;
}
public static ChatChannel valueOfOrNull(int channel) {
if (channel == WORLD.num) return WORLD;
if (channel == TEAM.num) return TEAM;
if (channel == GUILD.num) return GUILD;
if (channel == COOP.num) return COOP;
if (channel == PRIVATE.num) return PRIVATE;
return null;
}
public static ChatChannel valueOf0(String s) {
return switch (s) {
case "WORLD", "world" -> WORLD;
case "TEAM", "team" -> TEAM;
case "GUILD", "guild" -> GUILD;
case "COOP", "coop" -> COOP;
case "PRIVATE", "private" -> PRIVATE;
default -> throw new IllegalArgumentException("unknown string for ChatChannel: " + s);
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy