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 1+ # It is a setting file of VectorNetwork's original game "The Mix".
2+ #
3+ # GitHub: https://github.com/VectorNetworkProject/TheMix
4+ # Website: https://www.vector-network.tk
5+ # Discord: https://discord.gg/EF2G5dh
6+
7+ # Config version
18version : 7
9+ # You can set whether to enable developer mode.
10+ # Note: Do not forget to disable developer mode when publishing server.
211dev-mode : true
12+ # Please enter the name of the map.
313stage-world-name : stage
14+ # Please set the time the event will come. By default, it is held every 30 minutes.
15+ # This function will be implemented in the future.
416event-time : 30
17+ # Please set the time zone.
518timezone : Asia/Tokyo
6- join-block-id :
19+ # Please enter the block ID which can participate in the game when touching the block.
20+ join-block-id : 247
721
822red :
923 spawn1 :
Original file line number Diff line number Diff line change 88
99namespace VectorNetworkProject \TheMix \event \player ;
1010
11- use pocketmine \block \Block ;
1211use pocketmine \event \Listener ;
1312use pocketmine \event \player \PlayerInteractEvent ;
1413use VectorNetworkProject \TheMix \game \corepvp \TeamManager ;
@@ -23,7 +22,7 @@ public function event(PlayerInteractEvent $event)
2322 {
2423 $ player = $ event ->getPlayer ();
2524 $ block = $ event ->getBlock ();
26- if ($ block ->getId () === Block:: NETHER_REACTOR ) {
25+ if ($ block ->getId () === DefaultConfig:: getBlockId () ) {
2726 if (DefaultConfig::isDev ()) {
2827 return ;
2928 }
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ class DefaultConfig
2727 /** @var string */
2828 const TIMEZONE = 'timezone ' ;
2929
30+ /** @var string */
31+ const BLOCK_ID = "join-block-id " ;
32+
3033 /** @var string */
3134 const RED = 'red ' ;
3235
@@ -65,11 +68,22 @@ public static function getEventTime(): int
6568 return TheMix::getInstance ()->getConfig ()->get (self ::EVENT_TIME );
6669 }
6770
71+ /**
72+ * @return string
73+ */
6874 public static function getTimezone (): string
6975 {
7076 return TheMix::getInstance ()->getConfig ()->get (self ::TIMEZONE );
7177 }
7278
79+ /**
80+ * @return int
81+ */
82+ public static function getBlockId (): int
83+ {
84+ return TheMix::getInstance ()->getConfig ()->get (self ::BLOCK_ID );
85+ }
86+
7387 /**
7488 * @return array
7589 */
You can’t perform that action at this time.
0 commit comments