Add standalone lobby House selector and key-backed Mentat welcome
This commit is contained in:
parent
49a0a1d571
commit
51f67bd1ba
1 changed files with 568 additions and 5 deletions
|
|
@ -21,6 +21,9 @@ import java.util.*;
|
|||
/** Shared presentation layer. All gameplay callbacks run once on the server thread. */
|
||||
public final class NativeMenus {
|
||||
private NativeMenus() {}
|
||||
public static boolean isBedrock(Player player) {
|
||||
return Bukkit.getPluginManager().isPluginEnabled("floodgate") && Bedrock.isPlayer(player);
|
||||
}
|
||||
public record Choice(String label, String description, Runnable action, String imageUrl) {
|
||||
public Choice(String label,String description,Runnable action) { this(label,description,action,null); }
|
||||
}
|
||||
|
|
@ -57,7 +60,7 @@ public final class NativeMenus {
|
|||
if(!session.claim(player.getUniqueId())) return;
|
||||
Bukkit.getScheduler().runTask(plugin,()-> { if(player.isOnline()) c.action().run(); });
|
||||
},c.imageUrl())).toList();
|
||||
if(Bukkit.getPluginManager().isPluginEnabled("floodgate") && Bedrock.isPlayer(player)) {
|
||||
if(isBedrock(player)) {
|
||||
Bedrock.show(player,title,content,guarded); return;
|
||||
}
|
||||
// Dialogs were introduced with protocol 771 (Java 1.21.6). Fail closed if Via cannot identify a client.
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff