It sounds like the SQL information isn't the problem, but rather where it reads the character's permissions from the SQL and saves that variable. For example, something like:
Pseudo-code:
Code:
if(cmdArgs[0].equals(".char")) {
if(cmdArgs[1].equals("additem")) {
player.addItem(args[2], args[3]);//add id, amoutn
}
}
And seeing this, you do something like:
Code:
if(cmdArgs[0].equals(".char") && player.getPermissions() == 0) {//Normal Player
if(cmdArgs[1].equals("additem")) {
player.addItem(args[2], args[3]);//add id, amoutn
}
}
And that might cause the problem:
Code:
if(player.getPermissions() == 1) {
//250 lines of previous commands here
if(cmdArgs[0].equals(".char") && player.getPermissions() >= 0) {//Normal Player
if(cmdArgs[1].equals("additem")) {
player.addItem(args[2], args[3]);//add id, amoutn
}
}
//More commands after this...
}
So that the program is never executing that particular command because it's seeing "Oh, you typed in .char, so that's fine but, UH OH you don't have the required permissions as stated before at the beginning of the block, so let's ignore this command."
Or another possible explanation is that you might have done > instead of >=. The first would make sense for your problem, because you might be doing:
Code:
if(cmdArgs[0].equals(".char") && player.getPermissions() > 0) {//Allow anyone with permissions GREATER THAN 0 to execute this command
Whereas you want to be doing:
Code:
if(cmdArgs[0].equals(".char") && player.getPermissions() >= 0) {//Allow anyone with 0 or higher to execute this command
The only way we could tell for sure is if you posted your edit to the commands.