formatTime方法未定义

时间:2014-08-03 23:51:06

标签: java plugins minecraft

它说我没有UHCore类型的方法

pl.sendMessage(UHCore.TAG +“UHC以§6开头”+ UHCore.formatTime(UHCore.getTicks()) +“§a...”);

但该方法就在所述核心文件中

    public static String formatTime(int seconds){

    int hours = seconds / 3600;
    int remainder = seconds % 3600;
    int mins = remainder / 60;
    int secs = remainder % 60;

    if (hours > 0){
        return hours + ":" + mins + ":" + secs;
    }
    else if (mins > 0){
        return mins + ":" + secs;
    }
    else{
        return String.valueOf(secs);
    }

}

0 个答案:

没有答案