◆ 1.18 Support
──────────
1.18 is now finally supported!
◆ Cooldown Feature
──────────────
[ Requested by
illudota ]
Now you can finally put an end to those pesky egg spammers!
Two new lines have been added to the
options section in the
config:
use-throwing-cooldown and
throwing-cooldown-in-seconds
One new line was added to the
messages section in the
config:
throwing-while-cooldown
|
Feature enabled by default in the config with a value of 5.0 seconds
●
In accordance to the new feature - if you already had a config file generated before this update and you would like to configure the new feature, then please regenerate your config file or add the following default lines under the correct sections in your current config file:
Code (YAML):
options:
use-throwing-cooldown
: true
throwing-cooldown-in-seconds
: 5.0
Code (YAML):
messages:
throwing-while-cooldown
:
"&7[&eTCE&7] &fYour eggs are on cooldown. You cannot throw eggs for another &e</remaining> &fsecond(s)."
◆ API Changes
───────────
The API was updated with new methods for the cooldown feature.
isOnCooldown ( org.bukkit.entity.Player )
Returns a
boolean value which indicates if the player is currently on cooldown.
putOnCooldown ( org.bukkit.entity.Player )
Puts the
specified player on cooldown.
Returns a
boolean value which
returns false if the player is already on cooldown and
returns true if the player was successfully put on cooldown.
getRemainingCooldownTime ( org.bukkit.entity.Player )
Get the remaining seconds of the
player's cooldown.
Returns a
double value which is the remaining time of the player's cooldown and
returns 0 if the time is
below 0.
removeCooldown ( org.bukkit.entity.Player )
If the player has a cooldown applied when this method is called, then it will be removed and the player can throw an egg.
Found a Bug?
─────────
If you find any bugs then please send me a
message.