I have been making a very simple bukkit plugin for my server just for personal use. I made a command called players, when someone with the permission ("broadcaster.players"), it would display a list of the servers player. I also wanted to have it display the players gamemode in-game. But I don't know how to put both of them next to each other.
My Code:
if(cmd.getName().equalsIgnoreCase("players")){
Player player = (Player) sender;
if(sender instanceof Player){
if(sender.hasPermission("broadcaster.players")){
sender.sendMessage(player.getName());
}
}
}
Where it says sender.sendMessage(player.getName());
, I would like to display on the same line the gamemode.
so I tried:
sender.sendMessage(player.getName()player.getGameMode());
of course this never worked and i am not sure what to do, can anyone suggest to me what i could do, My code is pretty messy but I'm fairly new, so I don't know a lot of things, this is my first coding project and i need tons of help!
Thanks for your patience