From 1753089d68aeeadde84f223b6e1976197290eb21 Mon Sep 17 00:00:00 2001 From: "Toxic.Co" <104733482+ItsToxicGGAlt@users.noreply.github.com> Date: Sun, 31 Jul 2022 22:01:43 +0200 Subject: [PATCH 1/4] 2.0.2 - Maintenance Motd --- plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From c5991498508233bf676be9e6a5b09052964ef2ed Mon Sep 17 00:00:00 2001 From: "Toxic.Co" <104733482+ItsToxicGGAlt@users.noreply.github.com> Date: Sun, 31 Jul 2022 22:05:43 +0200 Subject: [PATCH 2/4] Implement Maintenace-Motd --- src/Electro/MaintenanceMode/Main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Electro/MaintenanceMode/Main.php b/src/Electro/MaintenanceMode/Main.php index ba217cd..8879185 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")); } } From b11c9b942bf660d81fb7210cfb1a85e934f559a2 Mon Sep 17 00:00:00 2001 From: "Toxic.Co" <104733482+ItsToxicGGAlt@users.noreply.github.com> Date: Sun, 31 Jul 2022 22:06:57 +0200 Subject: [PATCH 3/4] Update Main.php --- src/Electro/MaintenanceMode/Main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Electro/MaintenanceMode/Main.php b/src/Electro/MaintenanceMode/Main.php index 8879185..50b92a6 100644 --- a/src/Electro/MaintenanceMode/Main.php +++ b/src/Electro/MaintenanceMode/Main.php @@ -19,7 +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")); + $this->getServer()->getNetwork()->setName($this->getConfig()->get("Maintenance_Motd")); } } From 7264af4e645fca4b85dbb5bdf18014dfb7ef77ff Mon Sep 17 00:00:00 2001 From: "Toxic.Co" <104733482+ItsToxicGGAlt@users.noreply.github.com> Date: Sun, 31 Jul 2022 22:10:09 +0200 Subject: [PATCH 4/4] Motd --- resources/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"