This repository was archived by the owner on Feb 8, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
src/VectorNetworkProject/TheMix Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Discord: https://discord.gg/EF2G5dh
66
77# Config version
8- version : 7
8+ version : 8
99# You can set whether to enable developer mode.
1010# Note: Do not forget to disable developer mode when publishing server.
1111dev-mode : true
@@ -18,6 +18,9 @@ event-time: 30
1818timezone : Asia/Tokyo
1919# Please enter the block ID which can participate in the game when touching the block.
2020join-block-id : 247
21+ # Please configure server address and port.
22+ ip : play.vector-network.tk
23+ port : 19132
2124
2225red :
2326 spawn1 :
Original file line number Diff line number Diff line change 3636
3737class TheMix extends PluginBase
3838{
39- public const VERSION = 7 ;
39+ public const VERSION = 8 ;
4040
4141 /* @var TheMix $instance */
4242 private static $ instance = null ;
Original file line number Diff line number Diff line change @@ -84,6 +84,22 @@ public static function getBlockId(): int
8484 return TheMix::getInstance ()->getConfig ()->get (self ::BLOCK_ID );
8585 }
8686
87+ /**
88+ * @return string
89+ */
90+ public static function getIp (): string
91+ {
92+ return TheMix::getInstance ()->getConfig ()->get ('ip ' );
93+ }
94+
95+ /**
96+ * @return int
97+ */
98+ public static function getPort (): int
99+ {
100+ return TheMix::getInstance ()->getConfig ()->get ('port ' );
101+ }
102+
87103 /**
88104 * @return array
89105 */
Original file line number Diff line number Diff line change 1010
1111use pocketmine \scheduler \Task ;
1212use pocketmine \Server ;
13+ use VectorNetworkProject \TheMix \game \DefaultConfig ;
1314
1415class ResetGameTask extends Task
1516{
@@ -19,7 +20,7 @@ class ResetGameTask extends Task
1920 public function onRun (int $ currentTick )
2021 {
2122 foreach (Server::getInstance ()->getOnlinePlayers () as $ player ) {
22- $ player ->transfer (' play.vector-network.tk ' , 19132 , '再接続 ' );
23+ $ player ->transfer (DefaultConfig:: getIp (), DefaultConfig:: getPort () , '再接続 ' );
2324 }
2425 Server::getInstance ()->shutdown ();
2526 }
You can’t perform that action at this time.
0 commit comments