ipad54 / spleefpe Goto Github PK
View Code? Open in Web Editor NEWThis plugin add Spleef mini game to your server
License: GNU Lesser General Public License v3.0
This plugin add Spleef mini game to your server
License: GNU Lesser General Public License v3.0
when finished playing and playing again, the arena map disappears from the world. can join but the arena is missing...
add ScoreBoard
When players join, the sign nfo for the count of players doesn't work 0/12
The only thing you have to do is:
1.- / spleef make NameWorld
2.- Touch the spawnpoint
3.- Go back to the map you have registered and place a block
Error:
[22:00:06] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\Server::loadLevel() must be of the type string, null given, called in phar:///home/container/plugins/SpleefPE_dev-32.phar/src/sp/Main.php on line 245" (EXCEPTION) in "src/pocketmine/Server" at line 935
[22:00:06] [Server thread/CRITICAL]: #0 plugins/SpleefPE_dev-32.phar/src/sp/Main(245): pocketmine\Server->loadLevel(NULL )
[22:00:06] [Server thread/CRITICAL]: #1 src/pocketmine/plugin/MethodEventExecutor(42): sp\Main->joinArena(object pocketmine\event\player\PlayerInteractEvent)
[22:00:06] [Server thread/CRITICAL]: #2 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object sp\Main, object pocketmine\event\player\PlayerInteractEvent)
[22:00:06] [Server thread/CRITICAL]: #3 src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerInteractEvent)
[22:00:06] [Server thread/CRITICAL]: #4 src/pocketmine/Player(2608): pocketmine\event\Event->call()
[22:00:06] [Server thread/CRITICAL]: #5 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(150): pocketmine\Player->handleInventoryTransaction(object jasonwynn10\beacon\packet\InventoryTransactionPacketV2)
[22:00:06] [Server thread/CRITICAL]: #6 src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket(173): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleInventoryTransaction(object jasonwynn10\beacon\packet\InventoryTransactionPacketV2)
[22:00:06] [Server thread/CRITICAL]: #7 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
[22:00:06] [Server thread/CRITICAL]: #8 src/pocketmine/network/mcpe/protocol/BatchPacket(127): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object jasonwynn10\beacon\packet\InventoryTransactionPacketV2)
[22:00:06] [Server thread/CRITICAL]: #9 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
[22:00:06] [Server thread/CRITICAL]: #10 src/pocketmine/Player(3247): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
[22:00:06] [Server thread/CRITICAL]: #11 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
[22:00:06] [Server thread/CRITICAL]: #12 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[15] 81.0.36.1 11150, object raklib\protocol\EncapsulatedPacket, integer 0)
[22:00:06] [Server thread/CRITICAL]: #13 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
[22:00:06] [Server thread/CRITICAL]: #14 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
[22:00:06] [Server thread/CRITICAL]: #15 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe{closure}()
[22:00:06] [Server thread/CRITICAL]: #16 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
[22:00:06] [Server thread/CRITICAL]: #17 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1594929606.7463)
[22:00:06] [Server thread/CRITICAL]: #18 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
[22:00:06] [Server thread/CRITICAL]: #19 src/pocketmine/Server(1588): pocketmine\Server->start()
[22:00:06] [Server thread/CRITICAL]: #20 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
[22:00:06] [Server thread/CRITICAL]: #21 src/pocketmine/PocketMine(304): pocketmine\server()
[22:00:06] [Server thread/CRITICAL]: #22 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
Add scoreboard like floating text :D
Hi. I figured out that Pocketmine didnt save the world when the compression start.
Can you please add $level->save(true); to your code so the level is saved before comppresing
public function SetupArena(PlayerInteractEvent $e)
{
$p = $e->getPlayer();
$s = $p;
if (isset($this->setup[$p->getName()])) {
if ($this->setup[$s->getName()] == 1) {
$b = $e->getBlock();
$level = $p->getLevel()->getFolderName();
$this->cfg->set($level . "Spawn", array($b->getX(), $b->getY() + 1, $b->getZ()));
$this->cfg->save();
$this->level = $s->getLevel()->getFolderName();
if (!$this->cfg->get("arenas")) {
$this->cfg->set("arenas", array($this->level));
$this->cfg->save();
} else {
$array = $this->cfg->get("arenas");
array_push($array, $this->level);
$this->cfg->set("arenas", $array);
$this->cfg->save();
}
$p->sendMessage($this->msg->get("touch_sign"));
$p->teleport(new Position($this->getServer()->getDefaultLevel()->getSafeSpawn()->x, $this->getServer()->getDefaultLevel()->getSafeSpawn()->y, $this->getServer()->getDefaultLevel()->getSafeSpawn()->z, $this->getServer()->getDefaultLevel()));
unset($this->setup[$s->getName()]);
$this->setup[$s->getName()] = 2;
return true;
} elseif ($this->setup[$s->getName()] == 2) {
$b = $e->getBlock();
$tile = $p->getLevel()->getTile($b);
if ($tile instanceof Sign) {
$e->setCancelled();
$p->sendMessage("Registering arena..... ");
$level = $this->getServer()->getLevelByName($this->level);
$level->save(true);
$this->zipper($p, $this->level);
$this->cfg->set($this->level . "Sign", array($b->getX(), $b->getY(), $b->getZ(), $this->level));
$this->cfg->save();
$tile->setText(TE::AQUA . "§7[ §fJoin §7]", TE::YELLOW . "0 / 12", "§f" . $this->level, $this->prefix);
$p->sendMessage("Arena registered!");
$this->game[$this->level] = false;
unset($this->setup[$s->getName()]);
$this->levels = $this->cfg->get("arenas");
return true;
}
}
}
return true;
}
join sign keep 0/12
and crash server
Error: Undefined variable: p
File: plugins/SpleefPE/src/sp/Main
Line: 358
Type: ErrorException
THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: SpleefPE v1.0.1
Code:
[349] $this->getResetMap()->reload($lvl);
[350] $this->game[$level] = false;
[351] $winner->addTitle($this->msg->get("victory"));
[352] if(isset($this->inventory[$winner->getName()]))
[353] {
[354] $winner->getInventory()->setContents($this->inventory[$winner->getName()]);
[355] }
[356] if(isset($this->armor[$winner->getName()]))
[357] {
[358] $winner->getArmorInventory()->setContents($this->armor[$p->getName()]);
[359] }
[360] unset($this->armor[$winner->getName()]);
[361] unset($this->inventory[$winner->getName()]);
[362] }
[363] }
[364] }
[365]
[366] public function fix(string $level): void
[367] {
[368] $lvl = $this->getServer()->getLevelByName($level);
Backtrace:
#0 plugins/SpleefPE/src/sp/Main(358): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[21] Undefined variable: p, string[45] /root/KejuPM/plugins/SpleefPE/src/sp/Main.php, integer 358, array[8])
#1 plugins/SpleefPE/src/sp/task/GameTask(37): sp\Main->getWinner(string[7] classic)
#2 src/pocketmine/scheduler/TaskHandler(137): sp\task\GameTask->onRun(integer 73128)
#3 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 73128)
#4 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 73128)
#5 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 73128)
#6 src/pocketmine/Server(2154): pocketmine\Server->tick()
#7 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1588): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[13] /root/KejuPM/, string[21] /root/KejuPM/plugins/)
#10 src/pocketmine/PocketMine(304): pocketmine\server()
#11 (11): require(string[68] phar:///root/KejuPM/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
when a player joins the number of players on the mark does not increase, it remains 0/12. inventory reset items. For losing players, diamond shovel inventory is carried to the lobby.
The sign remains 0/12 when the player joins.
When the game starts, another player presses the sign which is starting the match and an internal server error...
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.