本文整理了Java中org.bukkit.configuration.file.YamlConfiguration.getDouble()
方法的一些代码示例,展示了YamlConfiguration.getDouble()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlConfiguration.getDouble()
方法的具体详情如下:
包路径:org.bukkit.configuration.file.YamlConfiguration
类名称:YamlConfiguration
方法名:getDouble
暂无
代码示例来源:origin: GlowstoneMC/Glowstone
@Override
public double getDouble(Key key) {
if (cache.containsKey(key)) {
return (Double) cache.get(key);
}
double doub = config.getDouble(key.path, (Double) key.def);
cache.put(key, doub);
return doub;
}
代码示例来源:origin: com.greatmancode/tools
@Override
public double getDouble(String path) {
return configFile.getDouble(path);
}
代码示例来源:origin: ChestShop-authors/ChestShop-3
private boolean isValid(String path) {
return configuration.getDouble(path, INVALID_PATH) != INVALID_PATH;
}
}
代码示例来源:origin: ChestShop-authors/ChestShop-3
double buyPrice = PriceUtil.getBuyPrice(event.getSignLine(PRICE_LINE));
if (isValid("min.buy_price." + itemType) && buyPrice < (configuration.getDouble("min.buy_price." + itemType) * amount)) {
event.setOutcome(BUY_PRICE_BELOW_MIN);
if (isValid("max.buy_price." + itemType) && buyPrice > (configuration.getDouble("max.buy_price." + itemType) * amount)) {
event.setOutcome(BUY_PRICE_ABOVE_MAX);
double sellPrice = PriceUtil.getSellPrice(event.getSignLine(PRICE_LINE));
if (isValid("min.sell_price." + itemType) && sellPrice < (configuration.getDouble("min.sell_price." + itemType) * amount)) {
event.setOutcome(SELL_PRICE_BELOW_MIN);
if (isValid("max.sell_price." + itemType) && sellPrice > (configuration.getDouble("max.sell_price." + itemType) * amount)) {
event.setOutcome(SELL_PRICE_ABOVE_MAX);
代码示例来源:origin: ChestShop-authors/ChestShop-3
@EventHandler(priority = EventPriority.LOW)
public void onPreTransaction(PreTransactionEvent event) {
if (event.isCancelled() || event.getTransactionType() != BUY || !(event.getOwnerInventory() instanceof AdminInventory)) {
return;
}
Player client = event.getClient();
if (!PriceUtil.hasBuyPrice(event.getSign().getLine(PRICE_LINE))) {
return;
}
for (String group : groupList) {
if (Permission.has(client, Permission.DISCOUNT + group)) {
event.setPrice(event.getPrice() * (config.getDouble(group) / 100));
return;
}
}
}
}
代码示例来源:origin: filoghost/HolographicDisplays
spaceBetweenLines = config.getDouble(ConfigNode.SPACE_BETWEEN_LINES.getPath());
preciseHologramMovement = config.getBoolean(ConfigNode.PRECISE_HOLOGRAM_MOVEMENT.getPath());
代码示例来源:origin: echurchill/CityWorld
oddsOfAppearance = Math.max(0.0, Math.min(1.0, metaYaml.getDouble(tagOddsOfAppearance, oddsOfAppearance)));
broadcastLocation = metaYaml.getBoolean(tagBroadcastLocation, broadcastLocation);
decayable = metaYaml.getBoolean(tagDecayable, decayable);
内容来源于网络,如有侵权,请联系作者删除!