Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM5 Update #419

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Register base command permission
Aericio committed Jul 17, 2023

Verified

This commit was signed with the committer’s verified signature.
commit 965c785f1451403e9c037f6ac11b69903115350a
4 changes: 1 addition & 3 deletions src/DaPigGuy/PiggyCustomEnchants/PiggyCustomEnchants.php
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
use CortexPE\Commando\BaseCommand;
use CortexPE\Commando\PacketHooker;
use DaPigGuy\libPiggyUpdateChecker\libPiggyUpdateChecker;
use DaPigGuy\PiggyCustomEnchants\blocks\PiggyObsidian;
use DaPigGuy\PiggyCustomEnchants\commands\CustomEnchantsCommand;
use DaPigGuy\PiggyCustomEnchants\enchants\CustomEnchant;
use DaPigGuy\PiggyCustomEnchants\enchants\ToggleableEnchantment;
@@ -24,7 +23,6 @@
use pocketmine\block\Block;
use pocketmine\block\RuntimeBlockStateRegistry;
use pocketmine\color\Color;
use pocketmine\data\bedrock\block\BlockTypeNames;
use pocketmine\data\bedrock\EffectIdMap;
use pocketmine\data\bedrock\item\ItemTypeNames;
use pocketmine\data\bedrock\item\SavedItemData;
@@ -162,7 +160,7 @@ public function areFormsEnabled(): bool
private static function registerItemsAndBlocks(): void
{
self::registerItem(ItemTypeNames::ENCHANTED_BOOK, EnchantedBook::ENCHANTED_BOOK(), ["enchanted_book"]);
self::registerBlock(BlockTypeNames::OBSIDIAN, PiggyObsidian::PIGGY_OBSIDIAN(), ["piggy_obsidian"]);
// self::registerBlock(BlockTypeNames::OBSIDIAN, PiggyObsidian::PIGGY_OBSIDIAN(), ["piggy_obsidian"]);
}

/**
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ public function onRun(CommandSender $sender, string $aliasUsed, array $args): vo

public function prepare(): void
{
$this->setPermission("piggycustomenchants.command.ce");

$this->registerSubCommand(new AboutSubCommand($this->plugin, "about", "Displays basic information about the plugin"));
$this->registerSubCommand(new EnchantSubCommand($this->plugin, "enchant", "Apply an enchantment on an item"));
$this->registerSubCommand(new InfoSubCommand($this->plugin, "info", "Get info on a custom enchant"));
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ public function showInfo(Player $player, CustomEnchant $enchantment): void
*/
public function prepare(): void
{
$this->setPermission("piggycustomenchants.command.ce.list");
$this->setPermission("piggycustomenchants.command.ce.info");
$this->registerArgument(0, new RawStringArgument("enchantment", true));
}
}