- Added an option in the config to limit the number of placeholders players can use in one message - Added Events and API
Config Changes: Added-
Code (YAML):
Messages : #The message to send when a message is cancelled due to the placeholder limit LimitReached : "&cPlease do now use excessive amount of placeholders in one message!" Settings : #Set the cooldown that is shared between all placeholders in the plugin (in seconds) #Placeholders will not be parsed when a player is in cooldown MaxPlaceholders : 3
Here is an example of getting whether a certain placeholder is under cooldown for a specific player
Code (Java):
public void simpleMethod
( Player player
) { if ( InteractiveChatAPI.
isPlaceholderOnCooldown ( player,
"[item]" ) ) { player.
sendMessage ( "You are on cooldown!" ) ; } else { player.
sendMessage ( "You are not on cooldown!" ) ; } }
Here is a simple EventHandler to change the title message of the mention ping