diff --git a/plugin.yml b/plugin.yml index 8107d6d..b83546c 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ main : Electro\MaintenanceMode\Main name: MaintenanceMode -version: 2.0.1 +version: 2.0.2 api: 4.0.0 Author: Electro diff --git a/resources/config.yml b/resources/config.yml index fecc7ff..9b66ddc 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -2,5 +2,7 @@ # If set to "true", Maintenance Mode Will Be Active Maintenance_Mode_Active: false +# Change everything inside of the "" below set your Motd when Maintenance Mode is on. +Maintenance_Motd: "§l§aCubicPE: §l§cMaintenance" # Change everything inside of the "" below to set your own message (Make sure to leave the "") -Maintenance_Mode_Message: "§l§aCubicPE is Currently Down For Maintenance" \ No newline at end of file +Maintenance_Mode_Message: "§l§aCubicPE is Currently Down For Maintenance" diff --git a/src/Electro/MaintenanceMode/Main.php b/src/Electro/MaintenanceMode/Main.php index ba217cd..50b92a6 100644 --- a/src/Electro/MaintenanceMode/Main.php +++ b/src/Electro/MaintenanceMode/Main.php @@ -19,6 +19,7 @@ public function onJoin(PlayerLoginEvent $event){ if ($this->getConfig()->get("Maintenance_Mode_Active") === true && !$player->hasPermission("maintenancemode.bypass")){ $player->kick($this->getConfig()->get("Maintenance_Mode_Message"), false); + $this->getServer()->getNetwork()->setName($this->getConfig()->get("Maintenance_Motd")); } }