mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-30 12:19:22 +00:00
Update to latest Forms Api changes
This commit is contained in:
@@ -27,6 +27,7 @@ package org.geysermc.floodgate.api;
|
||||
|
||||
import java.util.UUID;
|
||||
import org.geysermc.common.form.Form;
|
||||
import org.geysermc.common.form.FormBuilder;
|
||||
import org.geysermc.floodgate.api.link.PlayerLink;
|
||||
import org.geysermc.floodgate.api.player.FloodgatePlayer;
|
||||
|
||||
@@ -72,7 +73,9 @@ public interface FloodgateApi {
|
||||
*/
|
||||
boolean isFloodgateId(UUID uuid);
|
||||
|
||||
boolean sendForm(UUID uuid, Form form);
|
||||
boolean sendForm(UUID uuid, Form<?> form);
|
||||
|
||||
boolean sendForm(UUID uuid, FormBuilder<?, ?> formBuilder);
|
||||
|
||||
/**
|
||||
* Returns the instance that manages all the linking.
|
||||
|
||||
@@ -27,6 +27,7 @@ package org.geysermc.floodgate.api.player;
|
||||
|
||||
import java.util.UUID;
|
||||
import org.geysermc.common.form.Form;
|
||||
import org.geysermc.common.form.FormBuilder;
|
||||
import org.geysermc.floodgate.api.FloodgateApi;
|
||||
import org.geysermc.floodgate.util.DeviceOs;
|
||||
import org.geysermc.floodgate.util.InputMode;
|
||||
@@ -106,10 +107,14 @@ public interface FloodgatePlayer {
|
||||
*/
|
||||
RawSkin getRawSkin();
|
||||
|
||||
default boolean sendForm(Form form) {
|
||||
default boolean sendForm(Form<?> form) {
|
||||
return FloodgateApi.getInstance().sendForm(getCorrectUniqueId(), form);
|
||||
}
|
||||
|
||||
default boolean sendForm(FormBuilder<?, ?> formBuilder) {
|
||||
return sendForm(formBuilder.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts the FloodgatePlayer instance to a class that extends FloodgatePlayer.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user