Finish using the UUID, we are still using blocking methods.
I want to get fully away from blocking methods and instead make the user/player/prisoner/whatever wait to get an answer while we retrieve the uuid information asynchronously.
This commit is contained in:
@ -334,11 +334,10 @@ public class Jail {
|
||||
*
|
||||
* @param name The name of the prisoner to get.
|
||||
* @return the prisoner instance, can be null
|
||||
* @deprecated Use {@link #getPrisoner(UUID)}
|
||||
*/
|
||||
public Prisoner getPrisoner(String name) {
|
||||
public Prisoner getPrisonerByLastKnownName(String name) {
|
||||
for(Prisoner p : this.getAllPrisoners())
|
||||
if(p.getName().equalsIgnoreCase(name))
|
||||
if(p.getLastKnownName().equalsIgnoreCase(name))
|
||||
return p;
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user