mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Allow BedrockData and LinkedPlayer cloning
This commit is contained in:
parent
5ad495ce97
commit
ce2734d3b9
2 changed files with 12 additions and 2 deletions
|
@ -36,7 +36,7 @@ import lombok.Getter;
|
|||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public final class BedrockData {
|
||||
public final class BedrockData implements Cloneable {
|
||||
public static final int EXPECTED_LENGTH = 10;
|
||||
|
||||
private final String version;
|
||||
|
@ -96,4 +96,9 @@ public final class BedrockData {
|
|||
(fromProxy ? 1 : 0) + '\0' +
|
||||
(linkedPlayer != null ? linkedPlayer.toString() : "null");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BedrockData clone() throws CloneNotSupportedException {
|
||||
return (BedrockData) super.clone();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.UUID;
|
|||
|
||||
@Getter
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public final class LinkedPlayer {
|
||||
public final class LinkedPlayer implements Cloneable {
|
||||
/**
|
||||
* The Java username of the linked player
|
||||
*/
|
||||
|
@ -74,4 +74,9 @@ public final class LinkedPlayer {
|
|||
public String toString() {
|
||||
return javaUsername + ';' + javaUniqueId.toString() + ';' + bedrockId.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedPlayer clone() throws CloneNotSupportedException {
|
||||
return (LinkedPlayer) super.clone();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue