angelliax / footjob Goto Github PK
View Code? Open in Web Editor NEWCreating a portal that execute command as console and player
License: Apache License 2.0
Creating a portal that execute command as console and player
License: Apache License 2.0
When you stand in area and execute command for example (give player something) it will be executed as long as player stands in this area. Would be great if you can put delay (probably configurable) so you get your reward only once in a 10 seconds or so, not sure how this will act when multiple players cross area in same time.
Can you create a page where the plugin can be translated?
I want to help translate it
Foot job is crashing my server as I am restarting it can you please help me out. If how could I solve it
2020-11-26 [07:32:11] [Server thread/CRITICAL]: Error: "Call to a member function getPlayers() on null" (EXCEPTION) in "plugins/FootJob.phar/src/Tungsten/FootJob/RepeatingTask" at line 32
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #0 src/pocketmine/scheduler/TaskHandler(137): Tungsten\FootJob\RepeatingTask->onRun(integer 1)
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #1 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 1)
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #2 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #3 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #4 src/pocketmine/Server(2154): pocketmine\Server->tick()
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #5 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #6 src/pocketmine/Server(1588): pocketmine\Server->start()
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #7 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[37] , string[45] plugins)
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #8 src/pocketmine/PocketMine(304): pocketmine\server()
2020-11-26 [07:32:11] [Server thread/CRITICAL]: #9 (11): require(string[92] phar://C:/Pingperfect/Users/phillips/245879/PocketMine-MP.phar/src/pocketmine/Po)
2020-11-26 [07:32:11] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
2020-11-26 [07:32:11] [Server thread/EMERGENCY]: Please upload the "crashdumps/Thu_Nov_26-07.32.11-CST_2020.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
2020-11-26 [07:32:11] [Server thread/EMERGENCY]: The crash dump has been automatically submitted to the Crash Archive. You can view it on
I got this error on server start, recently added new area and this is happening:
PocketMine-MP Crash Dump Fri Sep 25 11:51:17 UTC 2020
Error: Call to a member function getPlayers() on null
File: plugins/FootJob.phar/src/Tungsten/FootJob/RepeatingTask
Line: 32
Type: Error
THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: FootJob v20.5.30
Code:
[23] }
[24]
[25]
[26] public function onRun($tick)
[27] {
[28] $internalConfig = $this->config->getAll();
[29] if (!is_array($internalConfig) or count($internalConfig) <= 0) return;
[30] foreach ($internalConfig as $value) {
[31] if(!is_array($value)) continue;
[32] $players = $this->fj->getServer()->getLevelByName($value["level"])->getPlayers();
[33] if ($players == []) continue;
[34] $x1 = $value["x"][0][0];
[35] $x2 = $value["x"][0][1];
[36] $y1 = $value["y"][0][0];
[37] $y2 = $value["y"][0][1];
[38] $z1 = $value["z"][0][0];
[39] $z2 = $value["z"][0][1];
[40] foreach ($players as $player) {
[41] if ($this->isInside($x1, $x2, $y1, $y2, $z1, $z2, $player)) {
[42] if (isset($value["consolecmds"])) {
Backtrace:
#0 src/pocketmine/scheduler/TaskHandler(137): Tungsten\FootJob\RepeatingTask->onRun(integer 1)
#1 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 1)
#2 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
#3 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
#4 src/pocketmine/Server(2154): pocketmine\Server->tick()
#5 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#6 src/pocketmine/Server(1588): pocketmine\Server->start()
#7 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#8 src/pocketmine/PocketMine(304): pocketmine\server()
#9 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
PocketMine-MP version: 3.15.1 [Protocol 408]
config.yml
enableUpdateChecker: true
mines-a:
x:
[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/DEBUG]: #7 (11): require(string[89] phar:///storage/emulated/0/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Pocke)
[09:07:10] [Server thread/INFO]: Disabling FootJob v20.5.30
Repeat Task in 1 ticks will cause lag in server, why not use PlayerMoveEvent ?
Version: 3.14.1
I havent changed any source code, just downloaded and installed it on my server.
Lots of code... and then this error:
13.07 05:56:18 [Server] INFO }[05:56:18] [Server thread/CRITICAL]: Error: "Class 'Tungsten\FootJob\Commands' not found" (EXCEPTION) in "plugins/FootJob-master/src/Tungsten/FootJob/FootJob" at line 20 13.07 05:56:18 [Server] Server thread/DEBUG #0 src/pocketmine/plugin/PluginBase(116): Tungsten\FootJob\FootJob->onEnable() 13.07 05:56:18 [Server] Server thread/DEBUG #1 src/pocketmine/plugin/PluginManager(552): pocketmine\plugin\PluginBase->setEnabled(boolean 1) 13.07 05:56:18 [Server] Server thread/DEBUG #2 src/pocketmine/Server(1787): pocketmine\plugin\PluginManager->enablePlugin(object Tungsten\FootJob\FootJob) 13.07 05:56:18 [Server] Server thread/DEBUG #3 src/pocketmine/Server(1773): pocketmine\Server->enablePlugin(object Tungsten\FootJob\FootJob) 13.07 05:56:18 [Server] Server thread/DEBUG #4 src/pocketmine/Server(1586): pocketmine\Server->enablePlugins(integer 1) 13.07 05:56:18 [Server] Server thread/DEBUG #5 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[48] /, string[56] /plugins/) 13.07 05:56:18 [Server] Server thread/DEBUG #6 src/pocketmine/PocketMine(304): pocketmine\server() 13.07 05:56:18 [Server] Server thread/DEBUG #7 (11): require(string[108] phar:///PMMP-Latest-Stable.phar/s) 13.07 05:56:18 [Server] Server thread/INFO Disabling FootJob v20.5.30
PLS fix
[Server thread/CRITICAL]: Error: "Call to a member function getPlayers() on null" (EXCEPTION) in "plugins/FootJob.phar/src/Tungsten/FootJob/RepeatingTask" at line 32
best greetz
Hi there,
Just came here to make an issue about the plugin crashing the server when I select the 2nd position.
Here's some info:
PocketMine-MP Crash Dump Sat Oct 10 12:34:30 UTC 2020
Error: Call to a member function getPlayers() on null
File: plugins/FootJob.phar/src/Tungsten/FootJob/RepeatingTask
Line: 32
Type: Error
Code:
[23] }
[24]
[25]
[26] public function onRun($tick)
[27] {
[28] $internalConfig = $this->config->getAll();
[29] if (!is_array($internalConfig) or count($internalConfig) <= 0) return;
[30] foreach ($internalConfig as $value) {
[31] if(!is_array($value)) continue;
[32] $players = $this->fj->getServer()->getLevelByName($value["level"])->getPlayers(); (Error Is Here)
[33] if ($players == []) continue;
[34] $x1 = $value["x"][0][0];
[35] $x2 = $value["x"][0][1];
[36] $y1 = $value["y"][0][0];
[37] $y2 = $value["y"][0][1];
[38] $z1 = $value["z"][0][0];
[39] $z2 = $value["z"][0][1];
[40] foreach ($players as $player) {
[41] if ($this->isInside($x1, $x2, $y1, $y2, $z1, $z2, $player)) {
[42] if (isset($value["consolecmds"])) {
Backtrace:
#0 src/pocketmine/scheduler/TaskHandler(137): Tungsten\FootJob\RepeatingTask->onRun(integer 1)
#1 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 1)
#2 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
#3 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
#4 src/pocketmine/Server(2154): pocketmine\Server->tick()
#5 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#6 src/pocketmine/Server(1588): pocketmine\Server->start()
#7 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[15] /home/gs-41203/, string[23] /home/gs-41203/plugins/)
#8 src/pocketmine/PocketMine(304): pocketmine\server()
#9 (11): require(string[95] phar:///pro/bin/mcpe/pocketmine-stable-1.16.20/PocketMine-MP.phar/src/pocketmine)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.