mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 18:24:43 +02:00
Reformat code
This commit is contained in:
@ -6,17 +6,17 @@ import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandlerImplementation;
|
||||
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
import com.plotsquared.sponge.SpongeMain;
|
||||
import java.util.UUID;
|
||||
import org.spongepowered.api.profile.GameProfile;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class SpongeUUIDHandler extends UUIDHandlerImplementation {
|
||||
|
||||
public SpongeUUIDHandler(UUIDWrapper wrapper) {
|
||||
super(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startCaching(Runnable whenDone) {
|
||||
|
||||
@Override public boolean startCaching(Runnable whenDone) {
|
||||
if (!super.startCaching(whenDone)) {
|
||||
return false;
|
||||
}
|
||||
@ -24,7 +24,8 @@ public class SpongeUUIDHandler extends UUIDHandlerImplementation {
|
||||
}
|
||||
|
||||
public boolean cache(Runnable whenDone) {
|
||||
for (GameProfile profile : SpongeMain.THIS.getServer().getGameProfileManager().getCache().getProfiles()) {
|
||||
for (GameProfile profile : SpongeMain.THIS.getServer().getGameProfileManager().getCache()
|
||||
.getProfiles()) {
|
||||
String name = profile.getName().orElse(null);
|
||||
if (name != null) {
|
||||
add(new StringWrapper(name), profile.getUniqueId());
|
||||
@ -32,16 +33,14 @@ public class SpongeUUIDHandler extends UUIDHandlerImplementation {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fetchUUID(String name, RunnableVal<UUID> ifFetch) {
|
||||
|
||||
@Override public void fetchUUID(String name, RunnableVal<UUID> ifFetch) {
|
||||
TaskManager.runTaskAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@Override public void run() {
|
||||
ifFetch.value = SpongeUUIDHandler.this.uuidWrapper.getUUID(name);
|
||||
TaskManager.runTask(ifFetch);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user