Replaces getPlayer calls with getPlayerExact.
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -3,7 +3,7 @@
|
||||
- [x] Switch all player score storage to use UUID instead of Player as the key
|
||||
- [x] Update logger usage to use getLogger() from JavaPlugin
|
||||
- [x] Remove or modernize any old/deprecated event registration (use @EventHandler and registerEvents)
|
||||
- [ ] Review and update player lookup logic to use getPlayerExact or handle case sensitivity
|
||||
- [x] Review and update player lookup logic to use getPlayerExact or handle case sensitivity
|
||||
- [x] Ensure all commands are properly defined in plugin.yml
|
||||
- [x] Initialize Gradle build system
|
||||
- [x] Set project metadata in build.gradle
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ScoreAddCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
}else if(split.length == 2){
|
||||
targetPlayer = _plugin.getServer().getPlayer(split[0]);
|
||||
targetPlayer = _plugin.getServer().getPlayerExact(split[0]);
|
||||
if(targetPlayer == null){
|
||||
echoError(sender, rcon, "Can't find a player with that name");
|
||||
return true;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ScoreGetCommand implements CommandExecutor {
|
||||
return true; //false;
|
||||
}
|
||||
}else if(split.length == 1){
|
||||
targetPlayer = _plugin.getServer().getPlayer(split[0]);
|
||||
targetPlayer = _plugin.getServer().getPlayerExact(split[0]);
|
||||
}else if(split.length > 1){
|
||||
echoUsage(sender, rcon);
|
||||
return true; //false;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ScoreResetCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
}else if(split.length == 2){
|
||||
targetPlayer = _plugin.getServer().getPlayer(split[0]);
|
||||
targetPlayer = _plugin.getServer().getPlayerExact(split[0]);
|
||||
if(targetPlayer == null){
|
||||
echoError(sender, rcon, "Can't find a player with that name");
|
||||
return true;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ScoreSubtractCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
}else if(split.length == 2){
|
||||
targetPlayer = _plugin.getServer().getPlayer(split[0]);
|
||||
targetPlayer = _plugin.getServer().getPlayerExact(split[0]);
|
||||
if(targetPlayer == null){
|
||||
echoError(sender, rcon, "Can't find a player with that name");
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user