By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.
OK, Don't show this again
Customize or hide alerts (join/leave messages, whitelist messages, outdated server/client messages, etc...) plugin for PocketMine-MP
With CustomAlerts you can customize or hide whitelist kick messages, outdated server/client messages, join/leave messages, first join messages, death messages, world change messages...
Colours:
Black ("&0");
Dark Blue ("&1");
Dark Green ("&2");
Dark Aqua ("&3");
Dark Red ("&4");
Dark Purple ("&5");
Gold ("&6");
Gray ("&7");
Dark Gray ("&8");
Blue ("&9");
Green ("&a");
Aqua ("&b");
Red ("&c");
Light Purple ("&d");
Yellow ("&e");
White ("&f");
Obfuscated ("&k");
Bold ("&l");
Strikethrough ("&m");
Underline ("&n");
Italic ("&o");
Reset ("&r");
---
#REMEMBER THAT IF YOU USE CustomAlerts EXTENSIONS, MESSAGES MAY NOT FOLLOW THE DEFAULT CONFIG
#Date/Time format (replaced in {TIME}). For format codes read http://php.net/manual/en/datetime.formats.php
datetime-format: "H:i:s"
#Server Motd message settings (available from MCPE 0.11.0 and later)
Motd:
#Motd update timeout
update-timeout: 1
#Show custom Motd
custom: true
#Motd message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&e[{TIME}] &aWelcome to your server! &n&b[{MAXPLAYERS}/{TOTALPLAYERS}]"
#Outdated Client message (available from MCPE 0.11.0 BUILD 11 and later)
OutdatedClient:
#Show custom Outdated Client message
custom: true
#Outdated Client message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&cYour MCPE client is outdated!"
#Outdated Server message (available from MCPE 0.11.0 BUILD 11 and later)
OutdatedServer:
#Show custom Outdated Server message
custom: true
#Outdated Server message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&cOops! Server outdated!"
#Whitelisted Server message (available from MCPE 0.11.0 BUILD 11 and later)
WhitelistedServer:
#Show custom Whitelisted Server message
custom: true
#Whitelisted Server message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c&oThis Server is whitelisted!"
#Full Server message (available from MCPE 0.11.0 BUILD 11 and later)
FullServer:
#Show custom Full Server message
custom: true
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&e{PLAYER}&b, The Server is full &c[{TOTALPLAYERS}/{MAXPLAYERS}]&b!\n&l&dTry to join later :)"
#First Join message settings
FirstJoin:
#Enable First Join message
enable: true
#First Join message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&2[{TIME}] &a{PLAYER}&d joined the game for the first time."
#Join message settings
Join:
#Hide Join message
hide: false
#Show custom Join message
custom: true
#Join message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&2[{TIME}] &a{PLAYER}&e joined the game."
#Quit message settings
Quit:
#Hide Quit message
hide: true
#Show custom Quit message
custom: false
#Quit message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&4[{TIME}] &c{PLAYER}&e has left the game"
#World Change message settings
WorldChange:
#Enable World Change message
enable: true
#World Change message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {ORIGIN}: Show origin world name
# - {PLAYER}: Show player name
# - {TARGET}: Show target world name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&2[{TIME}] &a{PLAYER}&e moved from &c{ORIGIN}&e to &a{TARGET}"
#Death message settings
Death:
#Hide deafult Death message
hide: false
#Show custom default Death message
custom: true
#Default Death message
#Available Tags:
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} died"
#Death by contact message
death-contact-message:
#Hide Death by contact message
hide: false
#Show custom Death by contact message
custom: true
#Death by contact message
#Available Tags:
# - {BLOCK}: The name of the block which killed the player
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&cOops! {PLAYER} was killed by {BLOCK}"
#Death by entity message (players and mobs)
kill-message:
#Hide Death by entity message
hide: false
#Show custom Death by entity message
custom: true
#Death by entity message
# - {KILLER}: The name of the killer entity
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&9{PLAYER} &ewas killed by &c{KILLER}"
#Death by projectile message
death-projectile-message:
#Hide Death by projectile message
hide: false
#Show custom Death by projectile message
custom: true
#Death by projectile message
# - {KILLER}: The name of the killer entity
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} was killed by {KILLER} by arrow"
#Death by suffocation message
death-suffocation-message:
#Hide Death by suffocation message
hide: false
#Show custom Death by suffocation message
custom: true
#Death by suffocation message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} suffocated"
#Death by fall message
death-fall-message:
#Hide Death by fall message
hide: false
#Show custom Death by fall message
custom: true
#Death by fall message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} fell from a high place"
#Death by fire message
death-fire-message:
#Hide Death by fire message
hide: false
#Show custom Death by fire message
custom: true
#Death by fire message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} went up in flames"
#Death on fire message
death-on-fire-message:
#Hide Death on fire message
hide: false
#Show custom Death on fire message
custom: true
#Death on fire message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} burned"
#Death by lava message
death-lava-message:
#Hide Death by lava message
hide: false
#Show custom Death by lava message
custom: true
#Death by lava message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} tried to swim in lava"
#Death by drowning message
death-drowning-message:
#Hide Death by drowning message
hide: false
#Show custom Death by drowning message
custom: true
#Death by drowning message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} drowned"
#Death by explosion message
death-explosion-message:
#Hide Death by explosion message
hide: false
#Show custom Death by explosion message
custom: true
#Death by explosion message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} exploded"
#Death by void message
death-void-message:
#Hide Death by void message
hide: false
#Show custom Death by void message
custom: true
#Death by void message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} fell into the void"
#Death by suicide message
death-suicide-message:
#Hide Death by suicide message
hide: false
#Show custom Death by suicide message
custom: true
#Death by suicide message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} committed suicide"
#Death magic message
death-magic-message:
#Hide Death magic message
hide: false
#Show custom Death magic message
custom: true
#Death magic message
# - {MAXPLAYERS}: Show the maximum number of players supported by the server
# - {PLAYER}: Show player name
# - {TIME}: Show current time
# - {TOTALPLAYERS}: Show the number of all online players
message: "&c{PLAYER} was killed by a spell"
customalerts.help
- CustomAlerts command Help permission
customalerts.info
- CustomAlerts command Info permission
customalerts.reload
- CustomAlerts command Reload permission
Basic Tutorial:
1. Define the plugin dependency in plugin.yml (you can check if CustomAlerts is installed in different ways):
depend: [CustomAlerts]
2. Include CustomAlerts API and CustomAlerts Events in your php code:
//PocketMine Event Listener
use pocketmine\event\Listener;
//CustomAlerts API
use CustomAlerts\CustomAlerts;
//CustomAlerts Events
use CustomAlerts\Events\CustomAlertsJoinEvent;
3. Create the class:
class Example extends PluginBase implements Listener {
}
4. Check if CustomAlerts API is compatible (insert this code in onEnable() function)
if(CustomAlerts::getAPI()->getAPIVersion() == "(used API version)"){
//API compatible
//Register Events
$this->getServer()->getPluginManager()->registerEvents($this, $this);
}else{
//API not compatible
$this->getPluginLoader()->disablePlugin($this);
}
}
5. Handle a CustomAlerts event (in this tutorial we will handle the CustomAlertsJoinEvent):
public function onCAJoinEvent(CustomAlertsJoinEvent $event){
CustomAlerts::getAPI()->setJoinMessage("Example Join message: " . $event->getPlayer()->getName());
}
6. Call the API function:
CustomAlerts::getAPI()->api_function();
This event is handled when a player dies.
Event functions are:
Player getPlayer()
Description:
Get death event player.
Return:
The death event player
EntityDamageEvent|null getCause()
Description:
Get death event cause.
Return:
The death event cause
This event is handled when a player is kicked due to full server.
Event functions are:
Player getPlayer()
Description:
Get event player.
Return:
The event player (instance of pocketmine\Player)
This event is handled when a player joins.
Event functions are:
Player getPlayer()
Description:
Get join event player.
Return:
The join event player (instance of pocketmine\Player)
string getPocketMineJoinMessage()
Description:
Get default PocketMine join message.
Return:
The default PocketMine join message
This event is handled when the motd is updated
Event functions are:
string getPocketMineMotd()
Description:
Get default PocketMine Motd.
Return:
The default PocketMine Motd
This event is handled when a player is kicked due to outdated client.
Event functions are:
Player getPlayer()
Description:
Get event player.
Return:
The event player (instance of pocketmine\Player)
This event is handled when a player is kicked due to outdated server.
Event functions are:
Player getPlayer()
Description:
Get event player.
Return:
The event player (instance of pocketmine\Player)
This event is handled when a player quits. It must be declared:
Event functions are:
Player getPlayer()
Description:
Get quit event player.
Return:
The quit event player (instance of pocketmine\Player)
string getPocketMineQuitMessage()
Description:
Get default PocketMine quit message.
Return:
The default PocketMine quit message
This event is handled when a player is kicked due to whitelisted server.
Event functions are:
Player getPlayer()
Description:
Get event player.
Return:
The event player (instance of pocketmine\Player)
This event is handled when a player changes world. It must be declared:
Event functions are:
Player getPlayer()
Description:
Get world change event player.
Return:
The world change event player (instance of pocketmine\Player)
Level getOrigin()
Description:
Get origin level.
Return:
The origin level (instance of pocketmine\Level)
Level getTarget()
Description:
Get target level.
Return:
The target level (instance of pocketmine\Level)
CustomAlerts API Functions:
string getVersion()
Description:
Get CustomAlerts plugin version
Return:
plugin version
string getAPIVersion()
Description:
Get the CustomAlerts API version.
Return:
plugin API version
boolean isMotdCustom()
Description:
Check if motd message is custom.
Return:
boolean
string getDefaultMotdMessage()
Description:
Get default motd message.
Return:
string the default motd message
string getMotdMessage()
Description:
Get current motd message.
Return:
string the current motd message
function setMotdMessage($message)
Description:
Set current motd message.
Parameters:
$message
boolean isOutdatedClientMessageCustom()
Description:
Check if outdated client message is custom.
Return:
boolean
string getDefaultOutdatedClientMessage(Player $player)
Description:
Get default outdated client message.
Parameters:
$player the current player
Return:
string the default outdated client message
string getOutdatedClientMessage()
Description:
Get current outdated client message.
Return:
string the current outdated client message
function setOutdatedClientMessage($message)
Description:
Set current outdated client message.
Parameters:
$message
boolean isOutdatedServerMessageCustom()
Description:
Check if outdated server message is custom.
Return:
boolean
string getDefaultOutdatedServerMessage(Player $player)
Description:
Get default outdated server message.
Parameters:
$player the current player
Return:
string the default outdated server message
string getOutdatedServerMessage()
Description:
Get current outdated server message.
Return:
string the current outdated server message
function setOutdatedServerMessage($message)
Description:
Set current outdated server message.
Parameters:
$message
boolean isWhitelistMessageCustom()
Description:
Check if whitelist message is custom.
Return:
boolean
string getDefaultWhitelistMessage(Player $player)
Description:
Get default whitelist message.
Parameters:
$player the current player
Return:
string the default whitelist message
string getWhitelistMessage()
Description:
Get current whitelist message.
Return:
string the current whitelist message
function setWhitelistMessage($message)
Description:
Set current whitelist message.
Parameters:
$message
boolean isFullServerMessageCustom()
Description:
Check if full server message is custom.
Return:
boolean
string getDefaultFullServerMessage(Player $player)
Description:
Get default full server message.
Parameters:
$player the current player
Return:
string the default full server message
string getFullServerMessage()
Description:
Get current full server message.
Return:
string the current full server message
function setFullServerMessage($message)
Description:
Set current full server message.
Parameters:
$message
boolean isDefaultFirstJoinMessageEnabled()
Description:
Check if default first join message is enabled.
Return:
boolean
string getDefaultFirstJoinMessage(Player $player)
Description:
Get default first join message.
Parameters:
$player the current player
Return:
string the default first join message
boolean hasJoinedFirstTime(Player $player)
Description:
Check if a player has joined for the first time.
Parameters:
$player
Return:
boolean
boolean isDefaultJoinMessageCustom()
Description:
Check if default join message is custom.
Return:
boolean
boolean isDefaultJoinMessageHidden()
Description:
Check if default join message is hidden.
Return:
boolean
string getDefaultJoinMessage(Player $player)
Description:
Get default join message.
Parameters:
$player the current player
Return:
string the default join message
string getJoinMessage()
Description:
Get current join message.
Return:
string the current join message
function setJoinMessage($message)
Description:
Set current join message.
Parameters:
$message
boolean isDefaultQuitMessageCustom()
Description:
Check if default quit message is custom.
Return:
boolean
boolean isDefaultQuitMessageHidden()
Description:
Check if default quit message is hidden.
Return:
boolean
string getDefaultQuitMessage(Player $player)
Description:
Get default quit message.
Parameters:
$player the current player
Return:
string the default quit message
string getQuitMessage()
Description:
Get current quit message.
Return:
string the current quit message
function setQuitMessage($message)
Description:
Set current quit message.
Parameters:
$message
boolean isDefaultWorldChangeMessageEnabled()
Description:
Check if default world change message is enabled.
Return:
boolean
string getDefaultWorldChangeMessage(Player $player, Level $origin, Level $target)
Description:
Get default world change message.
Parameters:
$player the current player
$origin the origin level
$target the target level
Return:
string the default world change message
string getWorldChangeMessage()
Description:
Get current world change message.
Return:
string the current world change message
function setWorldChangeMessage($message)
Description:
Set current world change message.
Parameters:
$message
boolean isDefaultDeathMessageCustom($cause = null)
Description:
Check if default death messages are custom.
Parameters:
$cause Check message by cause
Return:
boolean
boolean isDefaultDeathMessageHidden($cause = null)
Description:
Check if default death messages are hidden
Parameters:
$cause Check message by cause
Return:
boolean
string getDefaultDeathMessage(Player $player, $cause = null)
Description:
Get default death message related to the specified cause.
Parameters:
$player the current player
$cause the cause of death (instanceof EntityDamageEvent). If it's null, the function will return the default death message
Return:
string the default death message related to the specified cause
string getDeathMessage()
Description:
Get current death message.
Return:
string the current death message
function setDeathMessage($message)
Description:
Set current death message.
Parameters:
$message
Reply to review by :
You can leave one review per plugin release, and delete or update your review at any time