cn.nukkit.level.format.LevelProviderManager Java Examples

The following examples show how to use cn.nukkit.level.format.LevelProviderManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Server.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
public boolean isLevelGenerated(String name) {
    if (Objects.equals(name.trim(), "")) {
        return false;
    }

    String path = FastAppender.get(this.getDataPath(), "worlds/", name, "/");
    if (this.getLevelByName(name) == null) {

        if (LevelProviderManager.getProvider(path) == null) {
            return false;
        }
    }

    return true;
}
 
Example #2
Source File: Server.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public boolean isLevelGenerated(String name) {
    if (Objects.equals(name.trim(), "")) {
        return false;
    }

    String path = this.getDataPath() + "worlds/" + name + "/";
    if (this.getLevelByName(name) == null) {

        return LevelProviderManager.getProvider(path) != null;
    }

    return true;
}
 
Example #3
Source File: Server.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public boolean isLevelGenerated(String name) {
    if (Objects.equals(name.trim(), "")) {
        return false;
    }

    String path = this.getDataPath() + "worlds/" + name + "/";
    if (this.getLevelByName(name) == null) {

        if (LevelProviderManager.getProvider(path) == null) {
            return false;
        }
    }

    return true;
}