Java 类net.minecraft.server.ExceptionWorldConflict 实例源码

项目:CraftBukkit    文件:ServerShutdownThread.java   
@Override
public void run() {
    try {
        server.stop();
    } catch (ExceptionWorldConflict ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
项目:Craftbukkit    文件:ServerShutdownThread.java   
@Override
public void run() {
    try {
        server.stop();
    } catch (ExceptionWorldConflict ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
项目:Almura-Server    文件:ServerShutdownThread.java   
@Override
public void run() {
    try {
        server.stop();
    } catch (ExceptionWorldConflict ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
项目:Tweakkit-Server    文件:ServerShutdownThread.java   
@Override
public void run() {
    try {
        server.stop();
    } catch (ExceptionWorldConflict ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
项目:SpigotSource    文件:ServerShutdownThread.java   
@Override
public void run() {
    try {
        server.stop();
    } catch (ExceptionWorldConflict ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
项目:Craft-city    文件:ServerShutdownThread.java   
@Override
public void run() {
    try {
        server.stop();
    } catch (ExceptionWorldConflict ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
项目:DiffUtils    文件:CraftServer_1710.java   
@Override
public boolean unloadWorld(World world, boolean save) {
    if (world == null) {
        return false;
    }

    WorldServer handle = ((CraftWorld) world).getHandle();

    if (!(console.worlds.contains(handle))) {
        return false;
    }

    if (!(handle.dimension > 1)) {
        return false;
    }

    if (handle.players.size() > 0) {
        return false;
    }

    WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
    pluginManager.callEvent(e);

    if (e.isCancelled()) {
        return false;
    }

    if (save) {
        try {
            handle.save(true, null);
            handle.saveLevel();
            WorldSaveEvent event = new WorldSaveEvent(handle.getWorld());
            getPluginManager().callEvent(event);
        } catch (ExceptionWorldConflict ex) {
            getLogger().log(Level.SEVERE, null, ex);
        }
    }

    worlds.remove(world.getName().toLowerCase());
    console.worlds.remove(console.worlds.indexOf(handle));

    return true;
}
项目:CraftBukkit    文件:CraftServer.java   
@Override
public boolean unloadWorld(World world, boolean save) {
    if (world == null) {
        return false;
    }

    WorldServer handle = ((CraftWorld) world).getHandle();

    if (!(console.worlds.contains(handle))) {
        return false;
    }

    if (!(handle.dimension > 1)) {
        return false;
    }

    if (handle.players.size() > 0) {
        return false;
    }

    WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
    pluginManager.callEvent(e);

    if (e.isCancelled()) {
        return false;
    }

    if (save) {
        try {
            handle.save(true, null);
            handle.saveLevel();
            WorldSaveEvent event = new WorldSaveEvent(handle.getWorld());
            getPluginManager().callEvent(event);
        } catch (ExceptionWorldConflict ex) {
            getLogger().log(Level.SEVERE, null, ex);
        }
    }

    worlds.remove(world.getName().toLowerCase());
    console.worlds.remove(console.worlds.indexOf(handle));

    return true;
}
项目:Craft-city    文件:CraftServer.java   
public boolean unloadWorld(World world, boolean save) {
    if (world == null) {
        return false;
    }

    WorldServer handle = ((CraftWorld) world).getHandle();

    if (!(console.worlds.contains(handle))) {
        return false;
    }

    if (!(handle.dimension > 1)) {
        return false;
    }

    if (handle.players.size() > 0) {
        return false;
    }

    WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
    pluginManager.callEvent(e);

    if (e.isCancelled()) {
        return false;
    }

    if (save) {
        try {
            handle.save(true, null);
            handle.saveLevel();
            WorldSaveEvent event = new WorldSaveEvent(handle.getWorld());
            getPluginManager().callEvent(event);
        } catch (ExceptionWorldConflict ex) {
            getLogger().log(Level.SEVERE, null, ex);
        }
    }

    worlds.remove(world.getName().toLowerCase());
    console.worlds.remove(console.worlds.indexOf(handle));

    return true;
}