Add standalone lobby House selector and key-backed Mentat welcome

This commit is contained in:
unimatrixgit 2026-11-21 14:39:50 +01:00
commit 51f67bd1ba

View file

@ -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.