Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
78 lines
2.0 KiB
Java
78 lines
2.0 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package de.maxhenkel.voicechat.voice.common;
|
|
|
|
import de.maxhenkel.voicechat.api.Group;
|
|
import de.maxhenkel.voicechat.plugins.impl.GroupImpl;
|
|
import de.maxhenkel.voicechat.util.FriendlyByteBuf;
|
|
import java.util.Objects;
|
|
import java.util.UUID;
|
|
|
|
public class ClientGroup {
|
|
private final UUID id;
|
|
private final String name;
|
|
private final boolean hasPassword;
|
|
private final boolean persistent;
|
|
private final boolean hidden;
|
|
private final Group.Type type;
|
|
|
|
public ClientGroup(UUID id, String name, boolean hasPassword, boolean persistent, boolean hidden, Group.Type type) {
|
|
this.id = id;
|
|
this.name = name;
|
|
this.hasPassword = hasPassword;
|
|
this.persistent = persistent;
|
|
this.hidden = hidden;
|
|
this.type = type;
|
|
}
|
|
|
|
public UUID getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public boolean hasPassword() {
|
|
return this.hasPassword;
|
|
}
|
|
|
|
public boolean isPersistent() {
|
|
return this.persistent;
|
|
}
|
|
|
|
public boolean isHidden() {
|
|
return this.hidden;
|
|
}
|
|
|
|
public Group.Type getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public static ClientGroup fromBytes(FriendlyByteBuf buf) {
|
|
return new ClientGroup(buf.readUUID(), buf.readUtf(512), buf.readBoolean(), buf.readBoolean(), buf.readBoolean(), GroupImpl.TypeImpl.fromInt(buf.readShort()));
|
|
}
|
|
|
|
public void toBytes(FriendlyByteBuf buf) {
|
|
buf.writeUUID(this.id);
|
|
buf.writeUtf(this.name, 512);
|
|
buf.writeBoolean(this.hasPassword);
|
|
buf.writeBoolean(this.persistent);
|
|
buf.writeBoolean(this.hidden);
|
|
buf.writeShort(GroupImpl.TypeImpl.toInt(this.type));
|
|
}
|
|
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || this.getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
ClientGroup group = (ClientGroup)o;
|
|
return Objects.equals(this.id, group.id);
|
|
}
|
|
}
|
|
|