Use direct organisation and spice actions with functional commands

This commit is contained in:
unimatrixgit 2026-11-28 01:30:24 +01:00
commit 84d562e904

View file

@ -100,7 +100,7 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto
if(sender instanceof Player player&&command.getName().equals("drgui")&&args.length==1&&args[0].equalsIgnoreCase("lore")){organisations.lore(player);return true;}
if(sender instanceof Player player&&command.getName().equals("drgui")&&args.length==0){organisations.console(player);return true;}
if(sender instanceof Player player&&command.getName().equals("drgui")&&args.length==1&&args[0].equalsIgnoreCase("item")){giveCodex(player,true);return true;}
if(sender instanceof Player member&&List.of("clan","company","polgui").contains(command.getName())){organisations.open(member,command.getName().equals("clan")?"clans":command.getName().equals("company")?"companies":"offices");return true;}
if(sender instanceof Player member&&List.of("clan","company","politics","polgui").contains(command.getName())){organisations.command(member,command.getName().equals("clan")?"clans":command.getName().equals("company")?"companies":"offices",args);return true;}
if(!(sender instanceof Player p))return true;
if(command.getName().equals("house")&&args.length>0){
String id=args[0].toLowerCase(Locale.ROOT);