Fixes some problems in the calculation of the remaining cool-down time
This commit is contained in:
		@@ -122,7 +122,7 @@ public class BlacksmithTrait extends Trait {
 | 
			
		||||
        if (coolDowns.get(playerId) != null) {
 | 
			
		||||
            Calendar calendar = Calendar.getInstance();
 | 
			
		||||
            if (!calendar.after(coolDowns.get(playerId))) {
 | 
			
		||||
                int secondDifference = (int) ((calendar.getTimeInMillis() - coolDowns.get(playerId).getTimeInMillis()) * 1000);
 | 
			
		||||
                int secondDifference = (int) (coolDowns.get(playerId).getTimeInMillis() - calendar.getTimeInMillis()) / 1000;
 | 
			
		||||
                boolean exactTime = BlacksmithPlugin.getInstance().getSettings().getShowExactTime();
 | 
			
		||||
                sendNPCMessage(this.npc, player, replacePlaceholder(config.getCoolDownUnexpiredMessage(),
 | 
			
		||||
                        "{time}", TimeFormatter.formatTime(exactTime, secondDifference)));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user