Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matcracker committed Jul 20, 2019
1 parent 52349b6 commit 7a1b5c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/matcracker/BedcoreProtect/commands/CommandParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use pocketmine\item\ItemFactory;
use pocketmine\math\Vector3;
use pocketmine\Server;
use UnexpectedValueException;

CommandParser::initActions();

Expand Down Expand Up @@ -230,7 +229,6 @@ public function parse(): bool
* @param bool $restore
*
* @return string
* @throws UnexpectedValueException if it is used before CommandParser::parse()
*/
public function buildBlocksLogSelectionQuery(Vector3 $vector3, bool $restore = false): string
{
Expand Down Expand Up @@ -410,7 +408,6 @@ public function buildEntitiesLogSelectionQuery(Vector3 $vector3, bool $restore =
* It returns an array with the parsed data from the command.
*
* @return array
* @throws UnexpectedValueException if it is used before CommandParser::parse()
*/
public function getAllData(): array
{
Expand Down
5 changes: 5 additions & 0 deletions src/matcracker/BedcoreProtect/storage/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public function __construct(Main $plugin)
$this->plugin = $plugin;
}

/**
* Attempts to connect to the database. Returns true if success.
* @return bool
*/
public final function connect(): bool
{
try {
Expand All @@ -60,6 +64,7 @@ public final function connect(): bool
public final function getQueries(): Queries
{
if (!$this->isConnected()) {
$this->plugin->getLogger()->critical("Could not connect to the database! Check your connection, database settings or plugin configuration file");
$this->plugin->getServer()->getPluginManager()->disablePlugin($this->plugin);
}

Expand Down

0 comments on commit 7a1b5c5

Please sign in to comment.