The Soul
Moderator
Number of posts : 8
Points :
Registration date : 2009-12-31
|
Subject: Player Name Limit Thu Dec 31, 2009 1:00 am |
|
|
- Code:
-
public void name() { String[] name = new String[playerName.size]; playerName.toArray(name); for(int i = 0; i < name.length; i++) { if(name[i] > 12 || name[i] < 2) { return; } } } then add this to the run() method in the client class: - Code:
-
name(); I just wrote that up to check if a player's name is greater than 12 or less than 2, the server won't accept the connection.
|
|