Weitere Client- und ServerMessages für Verbindungsverlust und VoteCick
parent
d037ada8c5
commit
c0f309c844
@ -0,0 +1,25 @@
|
|||||||
|
package eu.jonahbauer.wizard.common.messages.client;
|
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public final class RejoinMessage extends ClientMessage {
|
||||||
|
/**
|
||||||
|
* UUID of the session
|
||||||
|
*/
|
||||||
|
private final UUID session;
|
||||||
|
/**
|
||||||
|
* UUID of the rejoining player
|
||||||
|
*/
|
||||||
|
private final UUID player;
|
||||||
|
/**
|
||||||
|
* Secret in order to assure that no malicious user wants to join the message
|
||||||
|
*/
|
||||||
|
private final String secret;
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package eu.jonahbauer.wizard.common.messages.server;
|
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public final class KickVotedMessage extends ServerMessage {
|
||||||
|
/**
|
||||||
|
* UUID of the voting player
|
||||||
|
*/
|
||||||
|
private final UUID voter;
|
||||||
|
/**
|
||||||
|
* UUID of player who is supposed to be kicked
|
||||||
|
*/
|
||||||
|
private final UUID player;
|
||||||
|
/**
|
||||||
|
* Time until the vote ends in {@link System#currentTimeMillis() UNIX time}
|
||||||
|
*/
|
||||||
|
private final long timeout;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package eu.jonahbauer.wizard.common.messages.server;
|
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public final class KickedMessage extends ServerMessage {
|
||||||
|
/**
|
||||||
|
* UUID of player who was kicked
|
||||||
|
*/
|
||||||
|
private final UUID player;
|
||||||
|
}
|
Loading…
Reference in New Issue