AngelliaX / FootJob

Creating a portal that execute command as console and player
Apache License 2.0
9 stars 6 forks source link

Lỗi Plugin FootJob #2

Closed ghost closed 4 years ago

ghost commented 4 years ago

[09:07:10] [Server thread/INFO]: Enabling FootJob v20.5.30 namespace Tungsten\FootJob;

use pocketmine\command\Command; use pocketmine\command\CommandSender; use pocketmine\command\PluginIdentifiableCommand; use pocketmine\Player; use pocketmine\plugin\Plugin; use Tungsten\FootJob\subcommands\addArea; use Tungsten\FootJob\subcommands\addconsolecmd; use Tungsten\FootJob\subcommands\addplayercmd; use Tungsten\FootJob\subcommands\help; use Tungsten\FootJob\subcommands\listsubcmd; use Tungsten\FootJob\subcommands\removearena;

class Commands extends Command implements PluginIdentifiableCommand { public $fj;

public function construct(FootJob $fj) { parent::construct("fj", "FootJobs Commands"); $this->setPermission("footjob.permission"); $this->fj = $fj; }

public function execute(CommandSender $sender, string $commandLabel, array $args) { if (!$sender->hasPermission($this->getPermission())) { $sender->sendMessage("§cYou dont have permission to use"); return; } if (!isset($args[0])) { $args[0] = "help"; } if (strtolower($args[0]) == "addarea" or strtolower($args[0]) == "aa") { if (!isset($args[1])) { $sender->sendMessage("§aThe area must have a name,/fj aa "); return; } if (!$sender instanceof Player) { $sender->sendMessage("§cOnly use in-game"); return; } $cmd = new addArea($this, $sender, $args); $this->fj->getServer()->getPluginManager()->registerEvents($cmd, $this->fj); } else if (strtolower($args[0]) == "list") { $cmd = new listsubcmd($this, $sender, $args); } else if (strtolower($args[0]) == "addplayercmd" or strtolower($args[0]) == "apc") { $cmd = new addplayercmd($this, $sender, $args); } else if (strtolower($args[0]) == "addconsolecmd" or strtolower($args[0]) == "acc") { $cmd = new addconsolecmd($this, $sender, $args); } else if (strtolower($args[0]) == "removearea" or strtolower($args[0]) == "ra") { $cmd = new removearena($this, $sender, $args); } else { $cmd = new help($this, $sender, $args); } }

public function getPlugin(): Plugin { return $this->fj; } [09:07:10] [Server thread/CRITICAL]: Error: "Class 'Tungsten\FootJob\Commands' not found" (EXCEPTION) in "plugins/FootJob/src/Tungsten/FootJob/FootJob" at line 19 [09:07:10] [Server thread/DEBUG]: #0 src/pocketmine/plugin/PluginBase(115): Tungsten\FootJob\FootJob->onEnable() [09:07:10] [Server thread/DEBUG]: #1 src/pocketmine/plugin/PluginManager(541): pocketmine\plugin\PluginBase->setEnabled(boolean 1) [09:07:10] [Server thread/DEBUG]: #2 src/pocketmine/Server(1783): pocketmine\plugin\PluginManager->enablePlugin(object Tungsten\FootJob\FootJob) [09:07:10] [Server thread/DEBUG]: #3 src/pocketmine/Server(1769): pocketmine\Server->enablePlugin(object Tungsten\FootJob\FootJob) [09:07:10] [Server thread/DEBUG]: #4 src/pocketmine/Server(1582): pocketmine\Server->enablePlugins(integer 1) [09:07:10] [Server thread/DEBUG]: #5 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[34] /storage/emulated/0/PocketMine-MP/, string[42] /storage/emulated/0/PocketMine-MP/plugins/) [09:07:10] [Server thread/DEBUG]: #6 src/pocketmine/PocketMine(295): pocketmine\server()

[09:07:10] [Server thread/INFO]: Disabling FootJob v20.5.30

AngelliaX commented 4 years ago

you didnt change anything on the file, did you

ghost commented 4 years ago

Ko sửa gì hết, để nguyên xài luôn =))

ghost commented 4 years ago

Hoặc cần plugin gì nữa để hoạt động ko ad

AngelliaX commented 4 years ago

chả rõ sao bị lỗi này nữa

ghost commented 4 years ago

Ad cũng bị lỗi nữa à

AngelliaX commented 4 years ago

t tải về thì xài bthg nên chưa rõ bị gì

ghost commented 4 years ago

Kì vậy =((

ghost commented 4 years ago

Ad thử cài 1 plugin này coi lỗi không =))

AngelliaX commented 4 years ago

đâu

Willoxey commented 4 years ago

I'm having the same exact error

AngelliaX commented 4 years ago

go to issue #4 there is a solution