Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

Commit ed971c5

Browse files
committed
Update Config
1 parent 2ad8b59 commit ed971c5

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

resources/config.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
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
18
version: 7
9+
# You can set whether to enable developer mode.
10+
# Note: Do not forget to disable developer mode when publishing server.
211
dev-mode: true
12+
# Please enter the name of the map.
313
stage-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.
416
event-time: 30
17+
# Please set the time zone.
518
timezone: 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

822
red:
923
spawn1:

src/VectorNetworkProject/TheMix/event/player/ThePlayerInteractEvent.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace VectorNetworkProject\TheMix\event\player;
1010

11-
use pocketmine\block\Block;
1211
use pocketmine\event\Listener;
1312
use pocketmine\event\player\PlayerInteractEvent;
1413
use 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
}

src/VectorNetworkProject/TheMix/game/DefaultConfig.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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
*/

0 commit comments

Comments
 (0)