sounds WAV -> OPUS
This commit is contained in:
parent
103e4d35f5
commit
93f98f9984
11 changed files with 367 additions and 554 deletions
|
@ -139,23 +139,26 @@ public class NetHandlerPlayServer extends NetHandler implements ICrafting, Scrip
|
|||
this.display = display;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UserValidator implements CharValidator {
|
||||
public boolean valid(char ch) {
|
||||
return /* (ch >= 'A' && ch <= 'Z') || */ (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '_' || ch == '-';
|
||||
}
|
||||
}
|
||||
|
||||
public static class NickValidator implements CharValidator {
|
||||
public boolean valid(char ch) {
|
||||
return (ch <= 0xff && Character.isLetterOrDigit(ch)) || (ch >= 32 && ch < 126);
|
||||
}
|
||||
}
|
||||
|
||||
public static final int MAX_USER_LENGTH = 16;
|
||||
public static final int MAX_NICK_LENGTH = 32;
|
||||
public static final int MAX_PASS_LENGTH = 64;
|
||||
public static final int MAX_CMD_LENGTH = 1024;
|
||||
|
||||
public static final CharValidator VALID_USER = new CharValidator() {
|
||||
public boolean valid(char ch) {
|
||||
return /* (ch >= 'A' && ch <= 'Z') || */ (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '_' || ch == '-';
|
||||
}
|
||||
};
|
||||
|
||||
public static final CharValidator VALID_NICK = new CharValidator() {
|
||||
public boolean valid(char ch) {
|
||||
return (ch <= 0xff && Character.isLetterOrDigit(ch)) || (ch >= 32 && ch < 126);
|
||||
}
|
||||
};
|
||||
public static final CharValidator VALID_USER = new UserValidator();
|
||||
public static final CharValidator VALID_NICK = new NickValidator();
|
||||
|
||||
private final NetConnection connection;
|
||||
private final Server server;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue