Skip to content

Can't use method getStatistics() #18

@qwqlilfish

Description

@qwqlilfish

I want to get Statistics of player.When I use Player.getStatistics() but I got nothing.Second time,I use Player.getStatistics().updateStatistics() I got these things in Chat.log():

[02:49:49] [Render thread/INFO]: [System] [CHAT] StatsHelper:{{Dropped=21, Picked Up=623, stat_type.minecraft.custom=3.87 km,  killed you  time(s)=1, Times Crafted=992, Times Mined=1, You killed  =278, Times Used=1}}

I think that is not the All

Then I need to get Distance Flown one of statistic by using getCustomStat(‘minecraft:fly_one_cm’):

[02:40:53] [Script:{"trigger":"KEY_RISING", "event":"key.mouse.left", "file":"irow.js"}/INFO]: [STDERR]: Caused by host exception: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2960.toString()" because "$$0" is null
[02:40:53] [Render thread/INFO]: [System] [CHAT] java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2960.toString()" because "$$0" is null
 at class_3445.method_14952 (class_3445.java 35:?)
 at class_3445.method_14950 (class_3445.java 29:?)
at class_3445.<init> (class_3445.java 22:?)
at class_3448.method_14961 (class_3448.java 36:?)
at Map.computeIfAbsent (Map.java 1066:?)
 at class_3448.method_14955 (class_3448.java 36:?)
at class_3448.method_14956 (class_3448.java 49:?)
 at StatsHelper.getCustomStat (StatsHelper.java 172:?)
 at :program (irow.js 7:21)

And I got this in getStatList() so much more repeated words:

[02:55:23] [Render thread/INFO]: [System] [CHAT] [Picked Up, Dropped, Times Mined, stat_type.minecraft.custom, Dropped, You killed  , Picked Up, Picked Up, Picked Up, Times Used, Dropped, Picked Up, Picked Up, Picked Up, Picked Up, Times Used, Times Used, Picked Up, Times Mined, stat_type.minecraft.custom, Dropped, Times Mined, Times Mined, Dropped, Times Used, Times Used, Picked Up, Picked Up, Dropped, Times Used, Picked Up, You killed  , Dropped, Times Used, stat_type.minecraft.custom, Picked Up, Picked Up, Dropped, stat_type.minecraft.custom, stat_type.minecraft.custom, Dropped, Picked Up, Times Crafted, Times Used, stat_type.minecraft.custom, Times Mined, Times Mined, Times Used, Dropped, Dropped, Picked Up, Picked Up, Picked Up, Times Used, Dropped, Picked Up, Times Used, Picked Up, stat_type.minecraft.custom, Picked Up, stat_type.minecraft.custom, Times Mined, Times Mined, Times Used, Times Used, Picked Up, Picked Up, Dropped, stat_type.minecraft.custom, Dropped, Times Mined, You killed  , Times Crafted, Times Used, Times Mined, Dropped, Picked Up, Times Used, Dropped, Times Mined, Dropped, Picked Up, stat_type.minecraft.custom, Times Mined, Picked Up, Times Mined,  killed you  time(s), Times Used, Picked Up, Times Used, Times Mined, Picked Up, Times Mined, Times Used, Times Used, Times Mined, Dropped, Picked Up, stat_type.minecraft.custom, Times Mined, Picked Up, Dropped, Times Mined, Picked Up, Dropped, Picked Up, Times Used, Dropped, Picked Up, Times Used, Dropped, Times Used, Picked Up, Picked Up, Times Used, You killed  , Picked Up, Times Mined, Picked Up, Picked Up, Dropped, Times Mined, Times Used, Picked Up, Picked Up, Dropped, Dropped, Times Mined, Dropped, Dropped, Dropped, Times Used, Picked Up, Picked Up, stat_type.minecraft.custom, Times Mined, Times Used, Dropped, Times Mined, Picked Up, Times Used, Times Mined,  killed you  time(s), Dropped, Times Used, Times Used, Picked Up, Picked Up, Times Mined, Times Used, stat_type.minecraft.custom, Picked Up, stat_type.minecraft.custom, Picked Up, Times Used, Dropped, Times Mined, Dropped, Times Used, stat_type.minecraft.custom, Picked Up, Picked Up, Picked Up, Picked Up, Dropped, Times Mined, Picked Up, Times Mined, Dropped, Times Mined, Dropped, Picked Up, Dropped, Dropped, Times Mined, stat_type.minecraft.custom, Picked Up, Picked Up, Picked Up, Dropped, Picked Up, Dropped, Times Crafted, Picked Up, Picked Up, Picked Up, Times Used, Picked Up, Picked Up, stat_type.minecraft.custom, Dropped, You killed  , Picked Up, Times Used, Dropped, Dropped, Picked Up,  killed you  time(s), Times Mined, Dropped, Times Used, Times Used, Dropped, Dropped, Times Mined, Picked Up, Dropped, You killed  , Times Used, Dropped, Dropped, Times Used, Times Used, Picked Up, Picked Up, Dropped, Times Mined, Picked Up, Dropped, Picked Up, stat_type.minecraft.custom,  killed you  time(s), stat_type.minecraft.custom, Picked Up, Picked Up, Picked Up, Dropped, stat_type.minecraft.custom, stat_type.minecraft.custom, Dropped, Dropped, Times Used, Picked Up, Times Mined,  killed you  time(s), Times Used, Times Mined, Picked Up, Dropped, Picked Up, Dropped, stat_type.minecraft.custom, Dropped, Dropped, Times Crafted, stat_type.minecraft.custom, Dropped, stat_type.minecraft.custom, Picked Up, Times Used, Times Used, Times Mined, Picked Up, Picked Up, stat_type.minecraft.custom, Picked Up, Dropped, Picked Up, Times Mined, Picked Up, Picked Up, Picked Up, Dropped, Picked Up, Picked Up, Picked Up, Picked Up, Picked Up, Times Mined, Times Mined, Dropped, Picked Up, Picked Up, Times Mined, Picked Up, Picked Up, Times Used, Times Used, stat_type.minecraft.custom, Times Crafted, Picked Up, Picked Up, Picked Up, Times Used, Picked Up, Picked Up, Times Mined, Picked Up, Times Used, Picked Up, stat_type.minecraft.custom, Times Mined, Times Crafted, Times Mined, You killed  , Times Used, Times Used, Dropped, stat_type.minecraft.custom, Times Used, Times Mined, Times Used, Picked Up, Picked Up, You killed  , Dropped, Times Used, Dropped, Dropped, stat_type.minecraft.custom, Times Mined, Times Mined, Times Used, Times Used, Times Used,  killed you  time(s), Times Mined, Dropped, Times Crafted, Times Crafted, Picked Up, Picked Up, Picked Up, Times Used, Times Used, Times Mined, Dropped, Picked Up, Times Used, stat_type.minecraft.custom, Dropped, Picked Up, Picked Up, Times Crafted, Times Used, stat_type.minecraft.custom, Picked Up, Times Used, Dropped, Times Used, Picked Up, Dropped, Times Used, Dropped, Picked Up, Picked Up, Times Used, Picked Up, stat_type.minecraft.custom, Picked Up, Times Mined, Dropped, Picked Up, Dropped, Dropped, Picked Up, Times Used, Times Used, Picked Up, stat_type.minecraft.custom, Times Mined, Picked Up, Times Crafted, stat_type.minecraft.custom, Times Used, Dropped, Times Used, Times Used, Picked Up, Times Used, Dropped, Times Mined, Picked Up, Picked Up, Dropped, stat_type.minecraft.custom, Dropped, Times Used, stat_type.minecraft.custom, Picked Up, Times Used, stat_type.minecraft.custom, Picked Up, Dropped, Picked Up, Picked Up, Times Mined, Times Mined, Times Used, Times Used, Times Used, stat_type.minecraft.custom, Picked Up, Dropped, Picked Up, Times Used, Times Used, stat_type.minecraft.custom, You killed  , Picked Up, Picked Up, Dropped, Times Used, Times Used, Times Mined, Picked Up, stat_type.minecraft.custom, Picked Up, Picked Up, Times Mined, stat_type.minecraft.custom, Picked Up, Picked Up, Picked Up, stat_type.minecraft.custom, Picked Up, Picked Up, Times Mined, Picked Up, Picked Up,  killed you  time(s), Dropped, stat_type.minecraft.custom, Picked Up, You killed  , Times Mined, Times Crafted, stat_type.minecraft.custom, Times Mined, stat_type.minecraft.custom, Picked Up, Picked Up, Picked Up, Dropped, Dropped, stat_type.minecraft.custom, Times Mined, Picked Up, Times Used, Times Used, Times Used, Dropped, Dropped, You killed  , Dropped, Picked Up, Picked Up, Dropped, Dropped, Picked Up, Times Used, Picked Up, Dropped, Picked Up, Dropped, Times Used, Picked Up, Picked Up, Picked Up, Times Used, Times Mined]

Also related methods in StatsHelper can't run properly to get some statistics like :.getCustomFormattedStat(ID) ,.getFormattedStatValue(statKey) ,.getRawStatValue(statKey) ,.getStatText(statKey)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions