View Javadoc

1   package org.dfdaemon.il2.api.command.request;
2   
3   import org.dfdaemon.il2.api.command.Command;
4   import org.dfdaemon.il2.api.command.reply.NoReply;
5   
6   
7   /**
8    * @author aka50
9    */
10  public class KickCmd extends Command<NoReply> {
11      public final String playerName;
12  
13      public KickCmd(String playerName) {
14          this.playerName = playerName;
15      }
16  
17      public boolean equals(Object o) {
18          if (this == o) return true;
19          if (o == null || getClass() != o.getClass()) return false;
20  
21          KickCmd kickCmd = (KickCmd) o;
22  
23          return !(playerName != null ? !playerName.equals(kickCmd.playerName) : kickCmd.playerName != null);
24  
25      }
26  
27      public int hashCode() {
28          return (playerName != null ? playerName.hashCode() : 0);
29      }
30  
31      public String toString() {
32          final StringBuilder sb = new StringBuilder();
33          sb.append("KickCmd");
34          sb.append("{");
35          sb.append("playerName='").append(playerName).append('\'');
36          sb.append('}');
37          return sb.toString();
38      }
39  }