Skip to content

Commit

Permalink
Release V1.5.3 (bug fix update)
Browse files Browse the repository at this point in the history
- Custom messages are now working
  • Loading branch information
supercrafter333 committed Dec 4, 2021
1 parent cf28b3b commit 265384d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .changlogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,9 @@ End of theSpawn PM3 support
### Changelog V1.5.1 » V1.5.2
> This version doesn't contain any major code changes from the previous version. It's only a bug fix update.
- *[FIX]* - Tasks are now properly canceled
- *[VERSION]* - Version bump

### Changelog V1.5.2 » V1.5.3
> This version doesn't contain any major code changes from the previous version. It's only a bug fix update.
- *[FIX]* - Custom messages are now working
- *[VERSION]* - Version bump
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/ca6cWPpERp)
# theSpawn - V1.5.2 [![](https://poggit.pmmp.io/shield.state/theSpawn)](https://poggit.pmmp.io/p/theSpawn) [![](https://poggit.pmmp.io/shield.dl.total/theSpawn)](https://poggit.pmmp.io/p/theSpawn)
# theSpawn - V1.5.3 [![](https://poggit.pmmp.io/shield.state/theSpawn)](https://poggit.pmmp.io/p/theSpawn) [![](https://poggit.pmmp.io/shield.dl.total/theSpawn)](https://poggit.pmmp.io/p/theSpawn)

**This plugin will replace MSpawns! Help me to make this plugin better!**

Expand Down
14 changes: 1 addition & 13 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
name: theSpawn
version: 1.5.2
version: 1.5.3
api: 4.0.0
main: supercrafter333\theSpawn\theSpawn
author: supercrafter333
# -> NOT NEEDED:
#mcpe-protocols:
# - 407
# - 408
# - 419
# - 422
# - 428
# - 431
# - 440
# - 448
# - 465
# - 471

permissions:
theSpawn.setspawn.cmd:
Expand Down
2 changes: 1 addition & 1 deletion resources/Languages/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ no-spawn-set-for-world: "§cThere's no spawn set for world {world}!"


#don't change this
version: "1.5.2"
version: "1.5.3"


############################
Expand Down
2 changes: 1 addition & 1 deletion resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ language: "en_BE"


#DON'T CHANGE THIS!!
version: "1.5.2"
version: "1.5.3"

############################
##########theSpawn##########
Expand Down
6 changes: 6 additions & 0 deletions src/supercrafter333/theSpawn/MsgMgr.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ public function checkMsgCfgVersionX(string $version): bool
return false;
}

private static function getLowerLang(): string
{
return strtolower(theSpawn::getInstance()->getConfig()->get("language"));
}

public static function getMessagesLanguage(): string
{
if (self::getLowerLang() == "custom") return theSpawn::getInstance()->getConfig()->get("language");
if (isset(self::$languages[theSpawn::getInstance()->getConfig()->get("language")])) return theSpawn::getInstance()->getConfig()->get("language");
return self::LANG_en_BE;
}
Expand Down
8 changes: 4 additions & 4 deletions src/supercrafter333/theSpawn/theSpawn.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class theSpawn extends PluginBase implements Listener
/**
* @var string
*/
public string $version = "1.5.2";
public string $version = "1.5.3";


/**
Expand All @@ -104,16 +104,16 @@ public function onEnable(): void
$this->saveResource("config.yml");
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$cmdMap = $this->getServer()->getCommandMap();
if (strtolower(MsgMgr::getMessagesLanguage()) == "custom") {
$this->saveResource("Languages/messages.yml");
}
# Version Check
$this->versionCheck($this->version, true); //UPDATE CONFIG DATAs.
###
$this->msgCfg = MsgMgr::getMsgs();
self::$prefix = MsgMgr::getPrefix();
@mkdir($this->getDataFolder() . "homes");
@mkdir($this->getDataFolder() . "Languages");
if (strtolower(MsgMgr::getMessagesLanguage()) == "custom") {
$this->saveResource("Languages/messages.yml");
}
$this->aliasCfg = new Config($this->getDataFolder() . "aliaslist.yml", Config::YAML);
$this->warpCfg = new Config($this->getDataFolder() . "warps.yml", Config::YAML);
$aliasCfg = new Config($this->getDataFolder() . "aliaslist.yml", Config::YAML);
Expand Down

1 comment on commit 265384d

@jasonw4331
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @supercrafter333,

I regret to inform you that your plugin "theSpawn" (v1.5.3 submitted on 2021-12-04T14:20:47.000Z) has been rejected.

C2b — PluginOwned:

All commands must implement the PluginOwned interface and return their plugin instance.

Please resolve these issues and submit the plugin again.

This comment is posted here because this is the last commit when the released build was created.

Please sign in to comment.