本帖最后由 yaoraoxiaosa 于 2023-3-11 16:51 编辑
有没有变量可以显示一段时间服务器玩家移动的距离最多的啊,想做一个跑图排行榜
或者有啥办法做个一定时间的跑图排行榜么
论坛上的[安全|管理]CMLP —— 定时检测跑图的熊孩子[全版本]
用不了
有没有变量可以显示一段时间服务器玩家移动的距离最多的啊,想做一个跑图排行榜
或者有啥办法做个一定时间的跑图排行榜么
论坛上的[安全|管理]CMLP —— 定时检测跑图的熊孩子[全版本]
用不了
/papi ecloud download Statistic
%statistic_walk_one_cm% (走过几厘米){一格为一米}
该变量用于统计,不过一段时间内我并未找到方法,或许可以尝试着定时清除数据(?)
%statistic_walk_one_cm% (走过几厘米){一格为一米}
该变量用于统计,不过一段时间内我并未找到方法,或许可以尝试着定时清除数据(?)
楚儿 发表于 2023-3-11 16:35
/papi ecloud download Statistic
%statistic_walk_one_cm% (走过几厘米){一格为一米}
该变量用于统计,不过 ...
哇,那怎么定期清除数据呀
楚儿 发表于 2023-3-11 16:35
/papi ecloud download Statistic
%statistic_walk_one_cm% (走过几厘米){一格为一米}
该变量用于统计,不过 ...
而且这个怎么获取最高路程的玩家名字啊
yaoraoxiaosa 发表于 2023-3-11 16:43
而且这个怎么获取最高路程的玩家名字啊
[开源付费][SCT]PlayerTop —— 一款有点好用的排行榜插件
https://www.mcbbs.net/thread-1351130-1-1.html
(出处: Minecraft(我的世界)中文论坛)
你可以尝试用排行榜插件
yaoraoxiaosa 发表于 2023-3-11 16:42
哇,那怎么定期清除数据呀
定期删除主世界文件夹中的stats文件夹
倒不如找些别的限制跑图插件。
比如AntiChunkLag
比如AntiChunkLag
名副其实 发表于 2023-3-11 19:50
倒不如找些别的限制跑图插件。
比如AntiChunkLag
不需要限制跑图,已经提前跑了,需要排行榜
叽叽小石头 发表于 2023-3-11 17:31
定期删除主世界文件夹中的stats文件夹
有没有办法只删除一项呢,我服有神秘遗物,需要很多统计信息
yaoraoxiaosa 发表于 2023-3-11 19:54
不需要限制跑图,已经提前跑了,需要排行榜
源代码的主体在这里,你可以找人改成一份 JavaScript 形式的,不过可能会有点消耗内存。
- public void check() {
- List<Player> ap = new ArrayList<>();
- ap.addAll(Arrays.asList(Bukkit.getServer().getOnlinePlayers()));
- if (ap.size() == 0)
- return;
- Player[] m = new Player[ap.size()];
- double[] n = new double[ap.size()];
- int num = 0;
- for (Player player : ap) {
- if (!this.last.containsKey(player) || !player.getLocation().getWorld().getName().equals(this.lastworld.get(player))) {
- this.last.put(player, new int[] { player.getLocation().getBlockX(), player.getLocation().getBlockZ() });
- this.lastworld.put(player, player.getLocation().getWorld().getName());
- continue;
- }
- int[] xz = this.last.get(player);
- double way = Math.sqrt(Math.pow(Math.abs(player.getLocation().getBlockX() - xz[0]), 2.0D) +
- Math.pow(Math.abs(player.getLocation().getBlockZ() - xz[1]), 2.0D));
- m[num] = player;
- n[num] = way;
- num++;
- this.last.put(player, new int[] { player.getLocation().getBlockX(), player.getLocation().getBlockZ() });
- }
- if (num != 1)
- for (int j = 0; j < num - 1; j++) {
- for (int k = j + 1; k < num; k++) {
- double pa = n[j];
- double pb = n[k];
- if (pa < pb) {
- Player temp = m[j];
- m[j] = m[k];
- m[k] = temp;
- double temp2 = n[j];
- n[j] = n[k];
- n[k] = temp2;
- }
- }
- }
yaoraoxiaosa 发表于 2023-3-11 20:32
比如指令什么的
进度是可以用指令删除的,这统计好像是不行但好像有这种定时删东西的插件
名副其实 发表于 2023-3-11 21:55
源代码的主体在这里,你可以找人改成一份 JavaScript 形式的,不过可能会有点消耗内存。
...
看起来很高级我研究研究