Skip to content

Commit

Permalink
Merge branch 'dev/4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyutsuki committed Mar 26, 2021
2 parents 7a2386d + 147a523 commit a2382db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mcpe-protocol:
- 428 # 1.16.210
softdepend:
# aieuo/Mineflow
- Mineflow # >= 1.3
- Mineflow # >= 2.0
virions:
# jojoe77777/libFormAPI
- libFormAPI # >= 1.3
Expand Down
12 changes: 7 additions & 5 deletions src/jp/mcbe/fuyutsuki/Texter/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,12 @@ private function loadFloatingTexts() {
$worldsPath = $this->findWorldsPath();
foreach ($worldsPath as $worldPath) {
$folderName = $this->getFileName($worldPath);
if (FloatingTextData::getInstance($folderName) !== null) {
$floatingTextData = FloatingTextData::getInstance($folderName);
if ($floatingTextData === null) {
$floatingTextData = new FloatingTextData($this, $folderName);
$floatingTextData->generateFloatingTexts($this);
}
$this->getLogger()->debug("Loaded FloatingTextCluster file: {$folderName}.json");
$floatingTextData->generateFloatingTexts($this);
$this->getLogger()->debug("Loaded FloatingText file: {$folderName}.json");
}
}

Expand Down Expand Up @@ -213,9 +214,10 @@ private function mineflowLinkage() {
if ($mineflow !== null) {
/** @var MineflowMain $mineflow */
Mineflow::setAvailable();

$variableHelper = $mineflow::getVariableHelper();
foreach (DefaultVariables::getServerVariables() as $defaultVariable) {
$variableHelper->add($defaultVariable);
foreach (DefaultVariables::getServerVariables() as $varName => $defaultVariable) {
$variableHelper->add($varName, $defaultVariable);
}
Mineflow::setVariableHelper($variableHelper);
}
Expand Down
3 changes: 3 additions & 0 deletions src/jp/mcbe/fuyutsuki/Texter/i18n/MineflowLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public function getAll(): array {
return $this->lang;
}

/**
* @return self[]
*/
public static function all(): array {
return self::$instances;
}
Expand Down

0 comments on commit a2382db

Please sign in to comment.