fix on playertype enum comparison

This commit is contained in:
igoudt 2017-04-26 00:37:06 +02:00
parent 7e9d4ab515
commit c1ce821340
3 changed files with 46 additions and 43 deletions

View file

@ -78,7 +78,7 @@ public class TablePlayerPanel extends javax.swing.JPanel {
}
public boolean joinTable(UUID roomId, UUID tableId) throws IOException, ClassNotFoundException {
if (!this.cbPlayerType.getSelectedItem().equals("Human")) {
if (this.cbPlayerType.getSelectedItem() != PlayerType.HUMAN) {
return SessionHandler.joinTable(roomId, tableId, this.newPlayerPanel.getPlayerName(), (PlayerType) this.cbPlayerType.getSelectedItem(), this.newPlayerPanel.getLevel(), DeckImporterUtil.importDeck(this.newPlayerPanel.getDeckFile()), "");
}
return true;