本帖最后由 3174941841 于 2020-1-10 07:46 编辑
代码如下
复制代码然鹅游戏中在生成第一次时间戳配置的时候
转换成date的时间是对得上的
服务器reload之后就对不上了....
求大佬解答
好了我已经自己解决了
原因是我在获取配置中的TimeStemp值的时候没有加载yaml配置
aaaaaa可怜我那70金粒的家当啊
代码如下
- double new_timeStemp = System.currentTimeMillis(); //获取最新的时间戳
- double old_timeStemp = database.getLong("playerData.TimeStemp"); //获取插件目录下已保存的时间戳
- String old_date = new SimpleDateFormat("yyyyMMdd").format(old_timeStemp); //将已保存的时间戳转成Date形式(只保留了年月日)
- String new_date = new SimpleDateFormat("yyyyMMdd").format(new_timeStemp); ////将最新的时间戳转成Date形式(只保留了年月日)
- sender.sendMessage(old_date); //发送出一条旧的时间戳的message
- sender.sendMessage(new_date + "new"); //发送出一条最新的时间戳的message 为了方便区分 我在后面加了"new"这个单词
转换成date的时间是对得上的

服务器reload之后就对不上了....

求大佬解答
好了我已经自己解决了

原因是我在获取配置中的TimeStemp值的时候没有加载yaml配置
aaaaaa可怜我那70金粒的家当啊

可能是插件的问题,和你的端不兼容,试试其他版本,或者换服务端
WarHawk 发表于 2020-1-9 22:30
可能是插件的问题,和你的端不兼容,试试其他版本,或者换服务端
.....大哥这是我自己写插件过程中遇到的问题
问题就是我秃了也没找到问题出在哪
