Skip to content

Commit

Permalink
Release V1.5.4 (bug fix update)
Browse files Browse the repository at this point in the history
- Fixed some bugs with warp permissions and forms
  • Loading branch information
supercrafter333 committed Dec 9, 2021
1 parent e5914ff commit 598cc59
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changlogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,9 @@ End of theSpawn PM3 support
### 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

### Changelog V1.5.3 » V1.5.4
> This version doesn't contain any major code changes from the previous version. It's only a bug fix update.
- *[FIX]* - Fixed some bugs with warp permissions and forms
- *[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.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)
# theSpawn - V1.5.4 [![](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
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: theSpawn
version: 1.5.3
version: 1.5.4
api: 4.0.0
main: supercrafter333\theSpawn\theSpawn
author: supercrafter333
Expand Down
2 changes: 1 addition & 1 deletion resources/Languages/en_BE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ form-warp-menu-warpButton: "§b{warp}§r{line}§7click to teleport"
# homes
form-home-menu-title: "Homes"
form-home-menu-content: "Please select a home."
form-home-menu-warpButton: "§b{home}§r{line}§7click to teleport"
form-home-menu-homeButton: "§b{home}§r{line}§7click to teleport"

#errors
#uses: none
Expand Down
2 changes: 1 addition & 1 deletion resources/Languages/ger_DE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ form-warp-menu-warpButton: "§b{warp}§r{line}§7Klicke für Teleportation"
# homes
form-home-menu-title: "Homes"
form-home-menu-content: "Bitte wähle ein Home aus."
form-home-menu-warpButton: "§b{home}§r{line}§7Klicke für Teleportation"
form-home-menu-homeButton: "§b{home}§r{line}§7Klicke für Teleportation"

#errors
#uses: none
Expand Down
14 changes: 13 additions & 1 deletion resources/Languages/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ tpa-ended: "The TpaInfo from {source} to {target} is ended now."
delay-tip: "§8[§eYou where teleported in §7{secs}§e!§8]"
delay-stopped-by-move: "§cTeleport cancelled because you've moved you."


#forms
# warps
form-warp-menu-title: "Warps"
form-warp-menu-content: "Please select a warp."
form-warp-menu-warpButton: "§b{warp}§r{line}§7click to teleport"
# homes
form-home-menu-title: "Homes"
form-home-menu-content: "Please select a home."
form-home-menu-homeButton: "§b{home}§r{line}§7click to teleport"


#errors
#uses: none
no-spawn-set: "§4ERROR --> §cNo spawn was set for this world!"
Expand All @@ -96,7 +108,7 @@ no-spawn-set-for-world: "§cThere's no spawn set for world {world}!"


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


############################
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.3"
version: "1.5.4"

############################
##########theSpawn##########
Expand Down
4 changes: 2 additions & 2 deletions src/supercrafter333/theSpawn/AliasMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace supercrafter333\theSpawn;

use pocketmine\command\Command;
use supercrafter333\theSpawn\Commands\theSpawnOwnedCommand;
use pocketmine\plugin\Plugin;

/**
* Class AliasMap
* @package supercrafter333\theSpawn
*/
abstract class AliasMap extends Command
abstract class AliasMap extends theSpawnOwnedCommand
{

/**
Expand Down
1 change: 0 additions & 1 deletion src/supercrafter333/theSpawn/Commands/WarpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function execute(CommandSender $s, string $commandLabel, array $args): vo
}
if (count($args) < 1) {
if ($pl->listWarps() !== null) {
$s->sendMessage($prefix . str_replace(["{warplist}"], [$pl->listWarps()], MsgMgr::getMsg("warplist")));
$s->getWorld()->addSound($s->getPosition(), new XpLevelUpSound(mt_rand(1, 100)));
if ($pl->useForms()) {
$warpForms = new WarpForms();
Expand Down
2 changes: 1 addition & 1 deletion src/supercrafter333/theSpawn/Forms/WarpForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function open(Player $player)
$form->setContent(MsgMgr::getMsg("form-warp-menu-content"));
foreach (theSpawn::getInstance()->getWarpCfg()->getAll() as $warp => $warpN) {
$warpName = $warpN["warpName"];
$form->addButton(str_replace(["{warp}", "{line}"], [$warpName, "\n"], MsgMgr::getMsg("form-warp-menu-homeButton")), -1, "", $warpName);
$form->addButton(str_replace(["{warp}", "{line}"], [$warpName, "\n"], MsgMgr::getMsg("form-warp-menu-warpButton")), -1, "", $warpName);
}
$form->sendToPlayer($player);
return $form;
Expand Down
2 changes: 1 addition & 1 deletion src/supercrafter333/theSpawn/Others/WarpInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function getWorld(): false|null|World

public function getPermission(): ?string
{
$perm = $this->getWarpCfg()->get($this->warpName, ["perm"]);
$perm = $this->getWarpCfg()->getNested($this->warpName . ".perm");
if ($perm !== null && $perm !== false) return $perm;
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion 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.3";
public string $version = "1.5.4";


/**
Expand Down

8 comments on commit 598cc59

@SOF3
Copy link

@SOF3 SOF3 commented on 598cc59 Dec 27, 2021

Choose a reason for hiding this comment

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

Dear @supercrafter333,

Why are you using dispatchCommand to call your own commands? Call the API directly please. dispatchCommand should not be used unless strictly necessary.

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

@supercrafter333
Copy link
Owner Author

@supercrafter333 supercrafter333 commented on 598cc59 Dec 27, 2021

Choose a reason for hiding this comment

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

When I use the command I don't have to change two codes when I change something on the command.

@supercrafter333
Copy link
Owner Author

Choose a reason for hiding this comment

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

@SOF3
Copy link

@SOF3 SOF3 commented on 598cc59 Dec 27, 2021

Choose a reason for hiding this comment

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

Make a common API function for them such that both form and command call that function. Otherwise if you change command syntax you will need to update your form code.

@supercrafter333
Copy link
Owner Author

Choose a reason for hiding this comment

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

I'll update my code whenever I change the command syntax.

@supercrafter333
Copy link
Owner Author

Choose a reason for hiding this comment

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

@SOF3 This isn't a reason to reject theSpawn on poggit.

@SOF3
Copy link

@SOF3 SOF3 commented on 598cc59 Dec 27, 2021

Choose a reason for hiding this comment

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

It is now. I added rule C5. https://poggit.pmmp.io/rules.edit

@supercrafter333
Copy link
Owner Author

Choose a reason for hiding this comment

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

Fixed in c4e729d

Please sign in to comment.