mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add /tphere, make /tp instantaneous, add images, slight refactoring
This commit is contained in:
1 parent
e37a55b214
commit
6149ebe983
17 files changed
+198
-50
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package net.william278.huskhomes.messenger;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import net.william278.huskhomes.position.Position;
|
||||
import net.william278.huskhomes.teleport.TeleportResult;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -15,6 +17,13 @@ public class MessagePayload {
|
||||
@Nullable
|
||||
public Position position;
|
||||
|
||||
/**
|
||||
* A teleport result field
|
||||
*/
|
||||
@Nullable
|
||||
@SerializedName("teleport_result")
|
||||
public TeleportResult teleportResult;
|
||||
|
||||
/**
|
||||
* Returns an empty cross-server message payload
|
||||
*
|
||||
@@ -38,6 +47,19 @@ public class MessagePayload {
|
||||
return payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a payload containing a {@link TeleportResult}
|
||||
*
|
||||
* @param teleportResult the teleport to send
|
||||
* @return a payload containing the teleport result
|
||||
*/
|
||||
@NotNull
|
||||
public static MessagePayload withTeleportResult(@NotNull TeleportResult teleportResult) {
|
||||
final MessagePayload payload = new MessagePayload();
|
||||
payload.teleportResult = teleportResult;
|
||||
return payload;
|
||||
}
|
||||
|
||||
private MessagePayload() {
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user