coding help

Discussion in 'Spigot Plugin Help' started by minecrafters, May 30, 2015.

  1. ok so this code, what am i doing wrong i am trying to get to were someone does in chat "-op"
    it will ban them code,

    Code (Text):
          public void onPlayerChat(AsyncPlayerChatEvent e)
            Player p = e.getPlayer();
            if (e.getMessage().equalsIgnoreCase("-op"))
           Bukkit.broadcastMessage(ChatColor.GOLD + p.getName() + " has been banned for atemping to hack!" );
    what am i doing wrong??
  2. When getting the message put a p instead of e so it would look more like this

  3. And also to ban you can do

  4. This totally seems legit but ok. You need to kick them after you banned them.
  5. This is a joke, right?
  6. What do you mean?