File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 32
32
"homepage" : " https://github.com/NyaaCat/NyaaStats#readme" ,
33
33
"dependencies" : {
34
34
"axios" : " ^0.19.2" ,
35
- "bignum" : " ^0.13.1" ,
36
35
"fs-extra" : " ^2.0.0" ,
37
36
"gauge" : " ^2.7.4" ,
38
37
"inquirer" : " ^5.2.0" ,
Original file line number Diff line number Diff line change 1
1
const axios = require ( 'axios' )
2
- const bignum = require ( 'bignum' )
3
2
const NBT = require ( 'mcnbt' )
4
3
const path = require ( 'path' )
5
4
const yaml = require ( 'js-yaml' )
@@ -37,7 +36,7 @@ module.exports = class Utils {
37
36
path . join ( this . config . render . level ) ,
38
37
( err ) => {
39
38
if ( err ) return reject ( err )
40
- return resolve ( bignum ( nbt . select ( '' ) . select ( 'Data' ) . select ( 'Time' ) . getValue ( ) ) . toNumber ( ) / 20 )
39
+ return resolve ( Number ( BigInt ( nbt . select ( '' ) . select ( 'Data' ) . select ( 'Time' ) . getValue ( ) ) ) / 20 )
41
40
} ,
42
41
)
43
42
} )
@@ -134,10 +133,10 @@ module.exports = class Utils {
134
133
lived = nbt . select ( '' ) . select ( 'Spigot.ticksLived' ) . getValue ( ) / 20
135
134
}
136
135
const timeStart = nbt . select ( '' ) . select ( 'bukkit' )
137
- ? bignum ( nbt . select ( '' ) . select ( 'bukkit' ) . select ( 'firstPlayed' ) . getValue ( ) ) . toNumber ( )
136
+ ? BigInt ( nbt . select ( '' ) . select ( 'bukkit' ) . select ( 'firstPlayed' ) . getValue ( ) )
138
137
: null
139
138
const timeLast = nbt . select ( '' ) . select ( 'bukkit' )
140
- ? bignum ( nbt . select ( '' ) . select ( 'bukkit' ) . select ( 'lastPlayed' ) . getValue ( ) ) . toNumber ( )
139
+ ? BigInt ( nbt . select ( '' ) . select ( 'bukkit' ) . select ( 'lastPlayed' ) . getValue ( ) )
141
140
: null
142
141
const pdata = {
143
142
seen : timeLast ,
You can’t perform that action at this time.
0 commit comments