mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Re-introduce online mode
This commit is contained in:
parent
a3586791b5
commit
3e2e61d2be
@ -60,12 +60,19 @@ public class OfflinePlayerUUIDService implements UUIDService {
|
|||||||
@Override @NotNull public List<UUIDMapping> getUUIDs(@NotNull final List<String> usernames) {
|
@Override @NotNull public List<UUIDMapping> getUUIDs(@NotNull final List<String> usernames) {
|
||||||
final List<UUIDMapping> wrappers = new ArrayList<>(usernames.size());
|
final List<UUIDMapping> wrappers = new ArrayList<>(usernames.size());
|
||||||
for (final String username : usernames) {
|
for (final String username : usernames) {
|
||||||
if (Settings.UUID.FORCE_LOWERCASE) {
|
if (Settings.UUID.OFFLINE) {
|
||||||
wrappers.add(new UUIDMapping(UUID.nameUUIDFromBytes(("OfflinePlayer:" +
|
if (Settings.UUID.FORCE_LOWERCASE) {
|
||||||
username.toLowerCase()).getBytes(Charsets.UTF_8)), username));
|
wrappers.add(new UUIDMapping(UUID.nameUUIDFromBytes(("OfflinePlayer:" +
|
||||||
|
username.toLowerCase()).getBytes(Charsets.UTF_8)), username));
|
||||||
|
} else {
|
||||||
|
wrappers.add(new UUIDMapping(UUID.nameUUIDFromBytes(("OfflinePlayer:" +
|
||||||
|
username).getBytes(Charsets.UTF_8)), username));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wrappers.add(new UUIDMapping(UUID.nameUUIDFromBytes(("OfflinePlayer:" +
|
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(username);
|
||||||
username).getBytes(Charsets.UTF_8)), username));
|
if (offlinePlayer.hasPlayedBefore()) {
|
||||||
|
wrappers.add(new UUIDMapping(offlinePlayer.getUniqueId(), offlinePlayer.getName()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return wrappers;
|
return wrappers;
|
||||||
|
Loading…
Reference in New Issue
Block a user