File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/lol/hyper/toolstats/events Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,14 @@ private void trackFlight(Player player, long startTime) {
8686 }
8787
8888 // get the duration of the flight
89- long duration = (System .currentTimeMillis () - startTime ) + flightTime ;
89+ long duration = (System .currentTimeMillis () - startTime );
90+ double newDuration = flightTime + duration ;
9091 container .set (toolStats .flightTime , PersistentDataType .LONG , flightTime + duration );
9192
9293 // do we add the lore based on the config?
9394 if (toolStats .config .getBoolean ("enabled.flight-time" )) {
9495 String oldFlightFormatted = toolStats .numberFormat .formatDouble ((double ) flightTime / 1000 );
95- String newFlightFormatted = toolStats .numberFormat .formatDouble (( double ) ( flightTime + duration ) / 1000 );
96+ String newFlightFormatted = toolStats .numberFormat .formatDouble (newDuration / 1000 );
9697 String oldLine = toolStats .configTools .formatLore ("flight-time" , "{time}" , oldFlightFormatted );
9798 String newLine = toolStats .configTools .formatLore ("flight-time" , "{time}" , newFlightFormatted );
9899 if (oldLine == null || newLine == null ) {
You can’t perform that action at this time.
0 commit comments