Ok so I'm making this /Admin Plugin where basically when you perform the command it puts you in creative mode and invisibility mode but I cant seem to get the GameMode statement to work here is my code and yes I have the import Code: if(cmd.getName().equalsIgnoreCase("admin")) { Player p = (Player)sender; if(!admin.contains(p)); for (Player pl : Bukkit.getServer().getOnlinePlayers()) { pl.hidePlayer(p); } admin.add(p); p.setGameMode(GAMEMODE.CREATIVE);
For setting armor, you have to get the PlayerInventory and then use the following methods to set armor contents. setLeggings(ItemStack leggings) setHelmet(ItemStack helmet) setChestplate(ItemStack chestplate) setBoots(ItemStack boots)
@Jayyy There's two ways. 1. Add to a HashMap the UUID and System time with there cooldown time or 2. Add to a list and remove in a scheduled task Then check times or check if they're in the list when they do the command
Any suggestions as to what I could replace it with? *Also there is this thing I've been having "trouble" with its really bothering me http://prntscr.com/83b6u6 how would I get rid of the listing of the command after I perform the command, for instance /cc *clearschat* /cc *<-----------* that shows up after i perform the command, It really bothers me and I can't figure it out
Actually the problem is the "Bukkit.getPlayer()" statement it draws a line through the statement, So I was wondering what other statement I would input to replace it? Thanks
If something is depreciated then it should still work. Crossed out with some sort of yellow underline or lightbulb? That's fine. If it has a red underline or red X then it isn't.
Thanks I'm just fairly new learning alot lately from the bukkit community glad to have everyone here helping me become better