mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-25 19:45:36 +01:00
Don't search unknown players by default
This shouldn't be needed in any of the internal usage of the event and could lead to unexpected network lookups.
This commit is contained in:
parent
02dd167024
commit
f9a0bf90a3
@ -11,7 +11,7 @@ public class AccountQueryEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final String name;
|
||||
private Account account = null;
|
||||
private boolean searchOfflinePlayers = true;
|
||||
private boolean searchOfflinePlayers = false;
|
||||
|
||||
public AccountQueryEvent(String name) {
|
||||
this.name = name;
|
||||
@ -38,7 +38,8 @@ public class AccountQueryEvent extends Event {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not offline player data should be searched (too)
|
||||
* Set whether or not offline player data should be searched (too).
|
||||
* This could lead to network lookups if the player by the name never joined the server!
|
||||
* @param searchOfflinePlayers Whether or not offline player data should be searched (too)
|
||||
*/
|
||||
public void searchOfflinePlayers(boolean searchOfflinePlayers) {
|
||||
|
@ -277,7 +277,6 @@ public class NameManager implements Listener {
|
||||
}
|
||||
|
||||
AccountQueryEvent queryEvent = new AccountQueryEvent(name);
|
||||
queryEvent.searchOfflinePlayers(false);
|
||||
ChestShop.callEvent(queryEvent);
|
||||
Account account = queryEvent.getAccount();
|
||||
if (account == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user