applqpak / TimeBan

Ban a player for specified amount of time.
MIT License
2 stars 1 forks source link

Error when people join then everyone after is banned #2

Open NML32 opened 7 years ago

NML32 commented 7 years ago

The below error shows in the console when the first person joins the server then after that everyone that tries to join is banned.

Server version: [Server thread/INFO]: This server is running PocketMine-MP 1.6.2dev-#61 「Unleashed」 implementing API version 3.0.0-ALPHA1 for Minecraft: PE v1.0.0.16 (protocol version 100)

Console Error: Warning: yaml_parse(): end of stream reached without finding document 0 in phar://C:/Users/Mark/Desktop/PocketMine - 1.0/PocketMine-MP.phar/src/pocketmine/utils/Config.php on line 143

Warning: yaml_parse(): end of stream reached without finding document 0 in phar://C:/Users/Mark/Desktop/PocketMine - 1.0/PocketMine-MP.phar/src/pocketmine/plugin/PluginBase.php on line 262 [16:18:11] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerPreLoginEvent' to 'TimeBan v1.0.0': Argument 1 passed to pocketmine\utils\Config::setDefaults() must be of the type array, boolean given, called in phar://C:/Users/Mark/Desktop/PocketMine - 1.0/PocketMine-MP.phar/src/pocketmine/plugin/PluginBase.php on line 262 on applqpak\TimeBan\event\EventListener [16:18:11] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\utils\Config::setDefaults() must be of the type array, boolean given, called in phar://C:/Users/Mark/Desktop/PocketMine - 1.0/PocketMine-MP.phar/src/pocketmine/plugin/PluginBase.php on line 262" (EXCEPTION) in "/src/pocketmine/utils/Config" at line 379

applqpak commented 7 years ago

Did you modify the config?

applqpak commented 7 years ago

Wait, I have a saveConfig method in the Main source file which collides with the saveConfig method in PluginBase, i'll update that quickly.

applqpak commented 7 years ago

Okay, try now.

applqpak commented 7 years ago

TimeBan.phar

NML32 commented 7 years ago

same thing is happening with the same errors.

applqpak commented 7 years ago

I wonder why

applqpak commented 7 years ago

Let me change the methods.

applqpak commented 7 years ago

done...

applqpak commented 7 years ago

TimeBan.phar

NML32 commented 7 years ago

Crashdump

PocketMine-MP Crash Dump Thu Jan 5 21:35:33 ACT 2017

Error: Argument 1 passed to pocketmine\utils\Config::setDefaults() must be of the type array, boolean given, called in phar://C:/Users/Mark/Desktop/PocketMine - 1.0/PocketMine-MP.phar/src/pocketmine/plugin/PluginBase.php on line 262 File: /src/pocketmine/utils/Config Line: 379 Type: notice

Code: [370] @return array [371] / [372] public function getAll($keys = \false){ [373] return ($keys === \true ? \array_keys($this->config) : $this->config); [374] } [375] [376] / [377] @param array $defaults [378] / [379] public function setDefaults(array $defaults){ [380] $this->fillDefaults($defaults, $this->config); [381] } [382] [383] / [384] @param $default [385] @param $data [386] [387] @return integer [388] */ [389] private function fillDefaults($default, &$data){

applqpak commented 7 years ago

I have no idea what's causing this error, the only methods calling the setDefaults method is the PluginBase source file in the PMMP project, so it seems to be an internal issue. Unless the config file is being modified.

Thunder33345 commented 7 years ago

unlikely but maybe because the config.yml in your resource folder is empty?