Tabnine Logo
ninja.leaping.configurate.commented
Code IndexAdd Tabnine to your IDE (free)

How to use ninja.leaping.configurate.commented

Best Java code snippets using ninja.leaping.configurate.commented (Showing top 20 results out of 315)

origin: EngineHub/WorldEdit

@Override
public void load() {
  super.load();
  creativeEnable = node.getNode("use-in-creative").getBoolean(false);
  cheatMode = node.getNode("cheat-mode").getBoolean(false);
  try {
    config.save(node);
  } catch (IOException e) {
    logger.warn("Error loading WorldEdit configuration", e);
  }
}
origin: EngineHub/WorldEdit

profile = node.getNode("debug").getBoolean(profile);
traceUnflushedSessions = node.getNode("debugging", "trace-unflushed-sessions").getBoolean(traceUnflushedSessions);
wandItem = node.getNode("wand-item").getString(wandItem);
try {
  wandItem = LegacyMapper.getInstance().getItemFromLegacy(Integer.parseInt(wandItem)).getId();
defaultChangeLimit = Math.max(-1, node.getNode("limits", "max-blocks-changed", "default").getInt(defaultChangeLimit));
maxChangeLimit = Math.max(-1, node.getNode("limits", "max-blocks-changed", "maximum").getInt(maxChangeLimit));
defaultMaxPolygonalPoints = Math.max(-1, node.getNode("limits", "max-polygonal-points", "default").getInt(defaultMaxPolygonalPoints));
maxPolygonalPoints = Math.max(-1, node.getNode("limits", "max-polygonal-points", "maximum").getInt(maxPolygonalPoints));
maxRadius = Math.max(-1, node.getNode("limits", "max-radius").getInt(maxRadius));
maxBrushRadius = node.getNode("limits", "max-brush-radius").getInt(maxBrushRadius);
maxSuperPickaxeSize = Math.max(1, node.getNode("limits", "max-super-pickaxe-size").getInt(maxSuperPickaxeSize));
butcherDefaultRadius = Math.max(-1, node.getNode("limits", "butcher-radius", "default").getInt(butcherDefaultRadius));
butcherMaxRadius = Math.max(-1, node.getNode("limits", "butcher-radius", "maximum").getInt(butcherMaxRadius));
  disallowedBlocks = new HashSet<>(node.getNode("limits", "disallowed-blocks").getList(TypeToken.of(String.class)));
} catch (ObjectMappingException e) {
  logger.warn("Error loading WorldEdit configuration", e);
  allowedDataCycleBlocks = new HashSet<>(node.getNode("limits", "allowed-data-cycle-blocks").getList(TypeToken.of(String.class)));
} catch (ObjectMappingException e) {
  logger.warn("Error loading WorldEdit configuration", e);
registerHelp = node.getNode("register-help").getBoolean(true);
logCommands = node.getNode("logging", "log-commands").getBoolean(logCommands);
origin: com.greatmancode/tools

@Override
public boolean has(String path) {
  return !file.getNode(path).isVirtual();
}
origin: Valandur/Web-API

  private <T> void setValueAndComment(ConfigurationNode node, TypeToken<T> type, T value, String comment)
      throws ObjectMappingException {
    node.setValue(type, value);
    if (node instanceof CommentedConfigurationNode) {
      ((CommentedConfigurationNode) node).setComment(comment);
    }
  }
}
origin: com.greatmancode/tools

@Override
public String getString(String path) {
  return file.getNode(path).getString();
}
origin: com.greatmancode/tools

@Override
public int getInt(String path) {
  return file.getNode(path).getInt();
}
origin: com.greatmancode/tools

@Override
public long getLong(String path) {
  return file.getNode(path).getLong();
}
origin: com.greatmancode/tools

@Override
public double getDouble(String path) {
  return file.getNode(path).getDouble();
}
origin: ninja.leaping.configurate/configurate-core

@Override
protected SimpleCommentedConfigurationNode createNode(Object path) {
  return new SimpleCommentedConfigurationNode(path, this, getOptions());
}
origin: ninja.leaping.configurate/configurate-core

@Override
public SimpleCommentedConfigurationNode setValue(Object value) {
  if (value instanceof CommentedConfigurationNode && ((CommentedConfigurationNode) value).getComment().isPresent()) {
    setComment(((CommentedConfigurationNode) value).getComment().get());
  }
  return (SimpleCommentedConfigurationNode)super.setValue(value);
}
origin: ninja.leaping.configurate/configurate-core

public static SimpleCommentedConfigurationNode root(ConfigurationOptions options) {
  return new SimpleCommentedConfigurationNode(null, null, options);
}
origin: ninja.leaping.configurate/configurate-core

@Override
public SimpleCommentedConfigurationNode setComment(String comment) {
  attachIfNecessary();
  this.comment.set(comment);
  return this;
}
origin: SpongePowered/configurate

@NonNull
@Override
public SimpleCommentedConfigurationNode copy() {
  return copy(null);
}
origin: com.greatmancode/tools

@Override
public boolean getBoolean(String path) {
  return file.getNode(path).getBoolean();
}
origin: Valandur/Web-API

private void setValueAndComment(ConfigurationNode node, Object value, String comment) {
  node.setValue(value);
  if (node instanceof CommentedConfigurationNode) {
    ((CommentedConfigurationNode) node).setComment(comment);
  }
}
private <T> void setValueAndComment(ConfigurationNode node, TypeToken<T> type, T value, String comment)
origin: SpongePowered/configurate

@Override
protected SimpleCommentedConfigurationNode createNode(Object path) {
  return new SimpleCommentedConfigurationNode(path, this, getOptions());
}
origin: SpongePowered/configurate

@NonNull
public static SimpleCommentedConfigurationNode root(@NonNull ConfigurationOptions options) {
  return new SimpleCommentedConfigurationNode(null, null, options);
}
origin: IntellectualSites/PlotSquared

/**
 * Has the server owner denied plugin metrics?
 *
 * @return true if metrics should be opted out of it
 */
public boolean isOptOut() {
  synchronized (optOutLock) {
    loadConfiguration();
    return config.getNode("mcstats.opt-out").getBoolean();
  }
}
origin: me.lucko.configurate/configurate-core

@Override
protected SimpleCommentedConfigurationNode createNode(Object path) {
  return new SimpleCommentedConfigurationNode(path, this, getOptions());
}
origin: me.lucko.configurate/configurate-core

@NonNull
public static SimpleCommentedConfigurationNode root(@NonNull ConfigurationOptions options) {
  return new SimpleCommentedConfigurationNode(null, null, options);
}
ninja.leaping.configurate.commented

Most used classes

  • CommentedConfigurationNode
    A configuration node that is capable of having an attached comment
  • SimpleCommentedConfigurationNode
    Basic implementation of CommentedConfigurationNode.
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now