public VoiceChannelUpdatePositionEvent(JDA api, long responseNumber, VoiceChannel channel, int oldPosition) { super(api, responseNumber, channel); this.oldPosition = oldPosition; this.newPosition = channel.getPositionRaw(); }
@Override public int compareTo(VoiceChannel chan) { Checks.notNull(chan, "Other VoiceChannel"); if (this == chan) return 0; Checks.check(getGuild().equals(chan.getGuild()), "Cannot compare VoiceChannels that aren't from the same guild!"); if (this.getPositionRaw() == chan.getPositionRaw()) return Long.compare(id, chan.getIdLong()); return Integer.compare(rawPosition, chan.getPositionRaw()); }