-5
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
Player player = (Player) sender;
if(commandLabel.equalsIgnoreCase("FlyTime")
|| commandLabel.equalsIgnoreCase("ft")){
if(args.length ==0){
player.sendMessage(
ChatColor.DARK_BLUE + "[FlyTime] " + ChatColor.GREEN
+ player.getDisplayName() + ChatColor.DARK_RED + " " + number
+ ChatColor.GREEN + " Secconds remain until "
+ ChatColor.AQUA + "FlyTime " + ChatColor.RED + "Enjoy!");
}
else if(args.length ==1){
if(player.isOp()){
number = args[0];
}
}
}
}
我的問題是試圖使參數改變整數的值,它只是不想改變。整數不工作bukkit