mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Commands.Database.CooldownMS - new locale string
This commit is contained in:
parent
8c0076ff80
commit
b5cbfc7f66
@ -10,6 +10,7 @@ Key:
|
|||||||
Version 2.1.41
|
Version 2.1.41
|
||||||
Fixed NullPointerException errors when trying to grab PlayerProfiles for players who have not loaded
|
Fixed NullPointerException errors when trying to grab PlayerProfiles for players who have not loaded
|
||||||
Added new locale string Profile.PendingLoad
|
Added new locale string Profile.PendingLoad
|
||||||
|
Added new locale string Commands.Database.CooldownMS
|
||||||
Fixed a display error preventing the remaining time on /mcrank from being shown if it was on cooldown
|
Fixed a display error preventing the remaining time on /mcrank from being shown if it was on cooldown
|
||||||
|
|
||||||
Version 2.1.40
|
Version 2.1.40
|
||||||
|
@ -95,10 +95,10 @@ public class McrankCommand implements TabExecutor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
long cooldownMillis = Math.max(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
long cooldownMillis = Math.min(Config.getInstance().getDatabasePlayerCooldown(), 1750);
|
||||||
|
|
||||||
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
if (mcMMOPlayer.getDatabaseATS() + cooldownMillis > System.currentTimeMillis()) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown", getCDSeconds(mcMMOPlayer, cooldownMillis)));
|
sender.sendMessage(LocaleLoader.getString("Commands.Database.CooldownMS", getCDSeconds(mcMMOPlayer, cooldownMillis)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,6 +119,6 @@ public class McrankCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private long getCDSeconds(McMMOPlayer mcMMOPlayer, long cooldownMillis) {
|
private long getCDSeconds(McMMOPlayer mcMMOPlayer, long cooldownMillis) {
|
||||||
return (System.currentTimeMillis() - (mcMMOPlayer.getDatabaseATS() + cooldownMillis)) / 1000;
|
return (System.currentTimeMillis() - (mcMMOPlayer.getDatabaseATS() + cooldownMillis));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -569,7 +569,7 @@ Commands.Chat.Console=*Console*
|
|||||||
Commands.Cooldowns.Header=[[GOLD]]--= [[GREEN]]mcMMO Ability Cooldowns[[GOLD]] =--
|
Commands.Cooldowns.Header=[[GOLD]]--= [[GREEN]]mcMMO Ability Cooldowns[[GOLD]] =--
|
||||||
Commands.Cooldowns.Row.N=\ [[RED]]{0}[[WHITE]] - [[GOLD]]{1} seconds left
|
Commands.Cooldowns.Row.N=\ [[RED]]{0}[[WHITE]] - [[GOLD]]{1} seconds left
|
||||||
Commands.Cooldowns.Row.Y=\ [[AQUA]]{0}[[WHITE]] - [[DARK_GREEN]]Ready!
|
Commands.Cooldowns.Row.Y=\ [[AQUA]]{0}[[WHITE]] - [[DARK_GREEN]]Ready!
|
||||||
Commands.Database.Cooldown=You must wait {0} seconds before using this command again.
|
Commands.Database.CooldownMS=You must wait {0} milliseconds before using this command again.
|
||||||
Commands.Database.Processing=Your previous command is still being processed. Please wait.
|
Commands.Database.Processing=Your previous command is still being processed. Please wait.
|
||||||
Commands.Disabled=This command is disabled.
|
Commands.Disabled=This command is disabled.
|
||||||
Commands.DoesNotExist= [[RED]]Player does not exist in the database!
|
Commands.DoesNotExist= [[RED]]Player does not exist in the database!
|
||||||
|
Loading…
Reference in New Issue
Block a user