CustomAlerts

CustomAlerts

por poggit-archive
No disponible

No funciona (falla al cargar) — Could not load plugin 'CustomAlerts_1.7.2-4.phar': Invalid plugin manifest: Invalid Plugin "permissions": Nested permission declarations are no longer supported. Declare each permission separately. · Probado en PocketMine-MP 5.50.0 (PHP 8.4.27).

Variospocketmine
6visitas
0descargas

General

Poggit Release

Customize or hide alerts (join/leave messages, whitelist messages, outdated server/client messages, etc...) plugin for PocketMine-MP

Overview

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...

Features

  • Customize or hide join, quit and death messages

  • Add first join and world change messages

  • Customize Motd

  • Customize Outdated Server/Client kick messages

  • Customize Whitelist kick messages

  • Customize Full Server kick messages

Colours

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");

Formatting

Obfuscated ("&k");

Bold ("&l");

Strikethrough ("&m");

Underline ("&n");

Italic ("&o");

Reset ("&r");

Configuration


#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"

Permissions

customalerts.help - CustomAlerts command Help permission

customalerts.info - CustomAlerts command Info permission

customalerts.reload- CustomAlerts command Reload permission

Developers

Basic Tutorial:

  1. Define the plugin dependency in plugin.yml (you can check if CustomAlerts is installed in different ways):

depend: [CustomAlerts]

  1. 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;

  1. Create the class:

class Example extends PluginBase implements Listener { }

  1. 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->getServer()->getPluginManager()->registerEvents(this, this); }else{ //API not compatible this->getPluginLoader()->disablePlugin($this); } }

  1. 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()); }

  1. Call the API function:

CustomAlerts::getAPI()->api_function();

CustomAlertsDeathEvent:

This event is handled when a player dies.

Event functions are:

Get Player:

Player getPlayer()

Description:

Get death event player.

Return:

The death event player

Get Cause:

EntityDamageEvent|null getCause()

Description:

Get death event cause.

Return:

The death event cause

CustomAlertsFullServerKickEvent:

This event is handled when a player is kicked due to full server.

Event functions are:

Get Player:

Player getPlayer()

Description:

Get event player.

Return:

The event player (instance of pocketmine\Player)

CustomAlertsJoinEvent:

This event is handled when a player joins.

Event functions are:

Get Player:

Player getPlayer()

Description:

Get join event player.

Return:

The join event player (instance of pocketmine\Player)

Get default PocketMine join message:

string getPocketMineJoinMessage()

Description:

Get default PocketMine join message.

Return:

The default PocketMine join message

CustomAlertsMotdUpdateEvent:

This event is handled when the motd is updated

Event functions are:

Get default PocketMine Motd:

string getPocketMineMotd()

Description:

Get default PocketMine Motd.

Return:

The default PocketMine Motd

CustomAlertsOutdatedClientKickEvent:

This event is handled when a player is kicked due to outdated client.

Event functions are:

Get Player:

Player getPlayer()

Description:

Get event player.

Return:

The event player (instance of pocketmine\Player)

CustomAlertsOutdatedServerKickEvent:

This event is handled when a player is kicked due to outdated server.

Event functions are:

Get Player:

Player getPlayer()

Description:

Get event player.

Return:

The event player (instance of pocketmine\Player)

CustomAlertsQuitEvent:

This event is handled when a player quits. It must be declared:

Event functions are:

Get Player:

Player getPlayer()

Description:

Get quit event player.

Return:

The quit event player (instance of pocketmine\Player)

Get default PocketMine quit message:

string getPocketMineQuitMessage()

Description:

Get default PocketMine quit message.

Return:

The default PocketMine quit message

CustomAlertsWhitelistKickEvent:

This event is handled when a player is kicked due to whitelisted server.

Event functions are:

Get Player:

Player getPlayer()

Description:

Get event player.

Return:

The event player (instance of pocketmine\Player)

CustomAlertsWorldChangeEvent:

This event is handled when a player changes world. It must be declared:

Event functions are:

Get Player:

Player getPlayer()

Description:

Get world change event player.

Return:

The world change event player (instance of pocketmine\Player)

Get Origin Level:

Level getOrigin()

Description:

Get origin level.

Return:

The origin level (instance of pocketmine\Level)

Get Target Level:

Level getTarget()

Description:

Get target level.

Return:

The target level (instance of pocketmine\Level)

CustomAlerts API Functions:

Get Version:

string getVersion()

Description:

Get CustomAlerts plugin version

Return:

plugin version

Get API Version:

string getAPIVersion()

Description:

Get the CustomAlerts API version.

Return:

plugin API version

Check if motd message is custom:

boolean isMotdCustom()

Description:

Check if motd message is custom.

Return:

boolean

Get default motd message:

string getDefaultMotdMessage()

Description:

Get default motd message.

Return:

string the default motd message

Get current motd message:

string getMotdMessage()

Description:

Get current motd message.

Return:

string the current motd message

Set current motd message:

function setMotdMessage($message)

Description:

Set current motd message.

Parameters:

$message

Check if outdated client message is custom:

boolean isOutdatedClientMessageCustom()

Description:

Check if outdated client message is custom.

Return:

boolean

Get default outdated client message:

string getDefaultOutdatedClientMessage(Player $player)

Description:

Get default outdated client message.

Parameters:

$player the current player

Return:

string the default outdated client message

Get current outdated client message:

string getOutdatedClientMessage()

Description:

Get current outdated client message.

Return:

string the current outdated client message

Set current outdated client message:

function setOutdatedClientMessage($message)

Description:

Set current outdated client message.

Parameters:

$message

Check if outdated server message is custom:

boolean isOutdatedServerMessageCustom()

Description:

Check if outdated server message is custom.

Return:

boolean

Get default outdated server message:

string getDefaultOutdatedServerMessage(Player $player)

Description:

Get default outdated server message.

Parameters:

$player the current player

Return:

string the default outdated server message

Get current outdated server message:

string getOutdatedServerMessage()

Description:

Get current outdated server message.

Return:

string the current outdated server message

Set current outdated server message:

function setOutdatedServerMessage($message)

Description:

Set current outdated server message.

Parameters:

$message

Check if whitelist message is custom:

boolean isWhitelistMessageCustom()

Description:

Check if whitelist message is custom.

Return:

boolean

Get default whitelist message:

string getDefaultWhitelistMessage(Player $player)

Description:

Get default whitelist message.

Parameters:

$player the current player

Return:

string the default whitelist message

Get current whitelist message:

string getWhitelistMessage()

Description:

Get current whitelist message.

Return:

string the current whitelist message

Set current whitelist message:

function setWhitelistMessage($message)

Description:

Set current whitelist message.

Parameters:

$message…