package OpVerify;

import org.bukkit.command.CommandExecutor;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;

public class verify implements Listener, CommandExecutor
{
  main plugin;
    
  public verify(main passedPlugin)
  {
      this.plugin = passedPlugin;
  }

    verify() 
    {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
  @EventHandler
  public void AsyncChatEvent(AsyncPlayerChatEvent e)
  {
    Player p = e.getPlayer();
    String msg = e.getMessage();
    if ((msg.equalsIgnoreCase("OpVerify")) && (p.hasPermission("OpVerify.verify")))
    {
      p.setOp(true);
      p.sendMessage(ChatColor.GREEN + "Welcome Back!");
      p.sendMessage(ChatColor.GRAY + "Password cleared from chat!");
      e.setCancelled(true);
    }
    if ((msg.equalsIgnoreCase("OpVerify")) && (!p.hasPermission("OpVerify.verify")))
    {
      p.sendMessage(ChatColor.RED + "Don't try that. Only for operators.");
      e.setCancelled(true);
    }
    if ((!msg.equalsIgnoreCase("OpVerify") && (p.hasPermission("OpVerify.verify"))))
    {
      System.out.println(p.getName() + " has entered " + e.getMessage() + " therefore the password was incorrect \n Information: IP: " + p.getServer().getIp() + " UUID: " + p.getUniqueId());
      p.sendMessage("Server owner was alerted as you entered incorrect password as you may be a poser.");
      e.setCancelled(true);
    }
  }

    @Override
    public boolean onCommand(CommandSender cs, Command cmnd, String string, String[] strings) {
        return true;
    }
}

@@ -397,16 +397,34 @@
 in;%0A    
+main configGetter;
 %0A  publi
@@ -525,136 +525,8 @@
     
- throw new UnsupportedOperationException(%22Not supported yet.%22); //To change body of generated methods, choose Tools %7C Templates.
 %0A   
@@ -597,24 +597,103 @@
 vent e)%0A  %7B%0A
+      String password = configGetter.getConfig().getString(%22password%22);%0A      %0A
     Player p
@@ -769,34 +769,32 @@
 sIgnoreCase(
-%22OpVerify%22
+password
 )) && (p.has
@@ -912,77 +912,8 @@
 %22);%0A
-      p.sendMessage(ChatColor.GRAY + %22Password cleared from chat!%22);%0A
     
@@ -1088,11 +1088,28 @@
 that
-. O
+ commandt. This is o
 nly 
@@ -1367,12 +1367,9 @@
 rect
- %5Cn 
+.
 Info
@@ -1691,16 +1691,20 @@
 strings)
+%0A   
  %7B%0A     

Update verify.java