All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.command.tree.node.XpLevelNode Maven / Gradle / Ivy

package cn.nukkit.command.tree.node;

import cn.nukkit.api.PowerNukkitXOnly;
import cn.nukkit.api.Since;

/**
 * 验证经验值或等级并解析为{@link Integer}值
 * 

* 不会默认使用,需要手动指定 */ @PowerNukkitXOnly @Since("1.19.60-r1") public class XpLevelNode extends ParamNode { @Override public void fill(String arg) { if (arg.endsWith("l") || arg.endsWith("L")) { try { this.value = Integer.parseInt(arg.substring(0, arg.length() - 1)); } catch (NumberFormatException e) { this.error(); } } else error(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy