mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 18:24:43 +02:00
Tab complete /p list
This commit is contained in:
@ -36,6 +36,9 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Default Bukkit world manager. It will handle world creation by
|
||||
@ -76,4 +79,13 @@ public class BukkitWorldManager implements PlatformWorldManager<World> {
|
||||
return "bukkit";
|
||||
}
|
||||
|
||||
@Override public Collection<String> getWorlds() {
|
||||
final List<World> worlds = Bukkit.getWorlds();
|
||||
final List<String> worldNames = new ArrayList<>();
|
||||
for (final World world : worlds) {
|
||||
worldNames.add(world.getName());
|
||||
}
|
||||
return worldNames;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user