Exemplo n.º 1
0
  /** Creates a new server. */
  public GlowServer(ServerConfig config) {
    this.config = config;
    // stuff based on selected config directory
    opsList = new UuidListFile(config.getFile("ops.json"));
    whitelist = new UuidListFile(config.getFile("whitelist.json"));
    nameBans = new GlowBanList(this, BanList.Type.NAME);
    ipBans = new GlowBanList(this, BanList.Type.IP);

    Bukkit.setServer(this);
    loadConfig();
  }
Exemplo n.º 2
0
  /** Reloads the server, refreshing settings and plugin information */
  @Override
  public void reload() {
    try {
      // Reload relevant configuration
      loadConfig();
      opsList.load();
      whitelist.load();
      nameBans.load();
      ipBans.load();

      // Reset crafting
      craftingManager.resetRecipes();

      // Load plugins
      loadPlugins();
      enablePlugins(PluginLoadOrder.STARTUP);
      enablePlugins(PluginLoadOrder.POSTWORLD);
    } catch (Exception ex) {
      logger.log(Level.SEVERE, "Uncaught error while reloading", ex);
    }
  }