Coder Social home page Coder Social logo

jojoe77777 / slapper Goto Github PK

View Code? Open in Web Editor NEW
97.0 32.0 148.0 159 KB

The new home of Slapper, the NPC plugin for PocketMine.

License: GNU Lesser General Public License v3.0

PHP 99.24% Shell 0.76%
npc-plugin slapper pmmp-plugin php72 pocketmine-plugins pmmp

slapper's Introduction

Slapper

Discord server

The new home of Slapper, the NPC plugin for PocketMine-MP.

NOTE

This plugin is designed for PocketMine-MP only and we do not support any other variations, forks or spoons. Compatibility with unofficial variants can occasionally be found, but do not expect support if you are using anything other than PocketMine-MP.

Addons

Official addons:

Basic documentation

Commands:

  • /slapper [args...]
  • /rca - Run command as another player! This can be used to only run the command if the player has permission.

Main level commands:

  • help: /slapper help
  • spawn: /slapper spawn [name]
  • edit: /slapper edit [id] [args...]
  • id: /slapper id
  • remove: /slapper remove [id]
  • version: /slapper version
  • cancel: /slapper cancel
  • updateall: /slapper updateall

Edit args:

  • helmet: /slapper edit helmet
  • chestplate: /slapper edit
  • leggings: /slapper edit leggings
  • boots: /slapper edit boots
  • skin: /slapper edit skin
  • name: /slapper edit name
  • addcommand: /slapper edit addcommand
  • delcommand: /slapper edit delcommand
  • listcommands: /slapper edit listcommands
  • update: /slapper edit update
  • block: /slapper edit block
  • tphere: /slapper edit tphere
  • tpto: /slapper edit tpto
  • menuname: /slapper edit menuname <name/remove>

Aliases for edit args

helmet: helm, helmet, head, hat, cap chestplate: chest, shirt, chestplate leggings: pants, legs, leggings boots: feet, boots, shoes item: hand, item, holding, arm, held skin: setskin, changeskin, editskin, skin name: name, customname menuname: listname, nameonlist, menuname namevisible: namevisible, customnamevisible, tagvisible, name_visible, custom_name_visible, tag_visible addcommand: addc, adduced, add command delcommand: delc, delcmd, delcommand, remove command listcommands: listcommands, listcmds, listcs fix: update, fix, migrate block: block, tile, blockid, tileid tphere: teleporthere, tphere, movehere, bringer tpto: teleportto, tpto, goto, teleport, tp

slapper's People

Contributors

95civicsi avatar dktapps avatar edwinyoo44 avatar eloklam avatar jojoe77777 avatar leejit avatar legoboy0215 avatar poggit-bot avatar sandertv avatar sleepspace9 avatar theutopianplayz avatar xenophilicy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slapper's Issues

Slappers not Saving

Whenever I create slappers with commands in the default world they always disappear. I tried installing slapper cache but it always says that all the slappers are fine. I may just be doing something wrong and if I am please tell me how to fix this!
Thank You,
Mrfanman345

[Feature] A config file for slappers

I think that slapper needs asap a config file. So, if for any reason the slapper.phar dont start we can restore the npc configs without lose it all! Also, we will be able to change from file commands or texts without enter the server.

Server crashes as soon as player connects.

Server crashing after updating to v1.1 due to slapper.

PocketMine-MP Crash Dump Sun Jun 4 01:16:47 CEST 2017

Error: Argument 1 passed to pocketmine\utils\Binary::writeVarLong_64() must be of the type integer, null given, called in phar:///home/gs/gs/data/servers/5786641/PocketMine-MP_1.6.2dev.phar/src/pocketmine/utils/Binary.php on line 650
File: /src/pocketmine/utils/Binary
Line: 677
Type: notice

Code:
[668] return self::writeUnsignedVarLong_32($v);
[669] }
[670]
[671] /**
[672] * 64-bit VarLong encoder.
[673] *
[674] * @param int $v
[675] * @return string
[676] /
[677] public static function writeVarLong_64(int $v) : string{
[678] return self::writeUnsignedVarLong_64(($v << 1) ^ ($v >> 63));
[679] }
[680]
[681] /
*
[682] * Writes a 64-bit integer as a variable-length long
[683] *
[684] * @param int|string $v
[685] * @return string up to 10 bytes
[686] */
[687] public static function writeUnsignedVarLong($v) : string{

Backtrace:
#0 /src/pocketmine/utils/Binary(650): pocketmine\utils\Binary::writeVarLong_64(NULL )
#1 /src/pocketmine/utils/BinaryStream(333): pocketmine\utils\Binary::writeVarLong(NULL )
#2 /src/pocketmine/network/mcpe/protocol/DataPacket(268): pocketmine\utils\BinaryStream->putVarLong(NULL )
#3 /src/pocketmine/network/mcpe/protocol/AddPlayerPacket(65): pocketmine\network\mcpe\protocol\DataPacket->putEntityUniqueId(NULL )
#4 /src/pocketmine/network/mcpe/RakLibInterface(193): pocketmine\network\mcpe\protocol\AddPlayerPacket->encode(boolean)
#5 /src/pocketmine/Player(1081): pocketmine\network\mcpe\RakLibInterface->putPacket(pocketmine\Player Player(1), pocketmine\network\mcpe\protocol\AddPlayerPacket object, boolean , boolean )
#6 /Slapper_v1.3.4.phar/src/slapper/entities/SlapperHuman(77): pocketmine\Player->dataPacket(pocketmine\network\mcpe\protocol\AddPlayerPacket object)
#7 /src/pocketmine/Player(913): slapper\entities\SlapperHuman->spawnTo(pocketmine\Player Player(1))
#8 /src/pocketmine/Player(861): pocketmine\Player->doFirstSpawn(boolean)
#9 /src/pocketmine/Player(1742): pocketmine\Player->sendNextChunk(boolean)
#10 /src/pocketmine/Server(2420): pocketmine\Player->checkNetwork(boolean)
#11 /src/pocketmine/Server(2182): pocketmine\Server->tick(boolean)
#12 /src/pocketmine/Server(2064): pocketmine\Server->tickProcessor(boolean)
#13 /src/pocketmine/Server(1646): pocketmine\Server->start(boolean)
#14 /src/pocketmine/PocketMine(501): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/gs/gs/data/servers/5786641/PocketMine-MP_1.6.2dev.phar/, string /home/gs/gs/data/servers/5786641/, string /home/gs/gs/data/servers/5786641/plugins/)
#15 (1): require_once(string phar:///home/gs/gs/data/servers/5786641/PocketMine-MP_1.6.2dev.phar/src/pocketmine/PocketMine.php)

PocketMine-MP version: 1.6.2dev #0 [Protocol 113; API 3.0.0-ALPHA5]
Git commit: 0000000000000000000000000000000000000000
uname -a: Linux ca39.server.pro 3.14.32-xxxx-grs-ipv6-64 #9 SMP Thu Oct 20 14:53:52 CEST 2016 x86_64
PHP Version: 7.0.9
Zend version: 3.0.0
OS : Linux, linux

Custom Skin

If you use an Custom Skin, get skin of person... the skin doesn't save...

You can fix, please?

Support for PMMP's Pocketmine. (The one you have linked as the only supported one... isn't supported.)

Since I really have no clue how to make a PR--- someone fix this-

Change every- "pocketmine\network\protocol\AddEntityPacket"
too- "pocketmine/network/mcpe/protocol/AddPlayerPacket.php"

And every "pocketmine\network\protocol\AddPlayerPacket"
too- "pocketmine/network/mcpe/protocol/AddPlayerPacket.php"

And every- "pocketmine\network\protocol\MovePlayerPacket"
too- "pocketmine/network/mcpe/protocol/MovePlayerPacket.php"
#48

Won't Spawn Entity

Hi, I've got a problem here:

Elywing thread:CRITICAL > Unhandled exception executing command 'slapper spawn human' in slapper: Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\format\Chunk, instance of pocketmine\level\Level given, called in phar://C:/Users/PC/Desktop/PocketMine-MP/plugins/Slapper.phar/src/slapper/Main.php on line 619
09:40:35 | Elywing thread:CRITICAL > TypeError: "Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\format\Chunk, instance of pocketmine\level\Level given, called in phar://C:/Users/PC/Desktop/PocketMine-MP/plugins/Slapper.phar/src/slapper/Main.php on line 619" (EXCEPTION) in "/src/pocketmine/entity/Entity" at line 613

How do I fix that error?

Spawning NPC's

When I try to spawn an NPC with '/slapper spawn player NeagDolph' it says an unknown internal error occurred. https://pastebin.com/qJWxRHg4 here is the console output. My server version is tesseract 1.0.6 and here are all my plugins Afk v0.3, AccidentCaps v0.0.1, PocketMoney v4.0.1, MoreCommands v1.1.4, BuycraftPM v0.1, PocketVote v1.2.0, SkyBlock v1.5.6, PurePerms v1.3.7, SimpleAuth v1.8.1, SimpleAuthHelper v2.0.5, AlwaysSpawn v2.2.2, Slapper v1.3.0, PureChat v1.4.0

Slapper Inventory save doesn't work

  1. For exemple if i am full diamond and i have a diamond sword in my hand, when i do /slapper spawn human test, the slapper doesn't have the full diamonds and the sword.

REQUEST-MultiWord_HitEntityArrow_Support

PHP 7.0.15
PocketMine-MP-1.6.2dev "Unleashed" (API 3.0.0-ALPHA3)

Slapper v1.3.3
SlapperCache v1.0.1

  1. created a slapper in my default world /slapper create villager bob
  2. /slapper edit ID addcommand item 19 1

now when i hit it with a sword or fire an arrow from a distance it registers the hit entity and drops the item.

this is great as i would like to use it in a game for my kids.

however, when i create a slapper in another world i.e targets only the sword hit registers and the arrows fired from a distance do not.

No errors are reported in console.

is this something you would be interested in looking into?

Kind regards
Star

Crashes in Latest Development Version of PocketMine

I believe possibly due to do: pmmp/PocketMine-MP@c21197e Slapper now causes a crash when any player joins the server:

[Server thread/CRITICAL]: TypeError: "Argument 1 passed to slapper\entities\SlapperEntity::__construct() must be an instance of pocketmine\level\format\Chunk, instance of pocketmine\level\Level given, called in C:\PocketMine-MP\src\pocketmine\entity\Entity.php on line 527" (EXCEPTION) in "/plugins/Slapper.phar/src/slapper/entities/SlapperEntity" at line 28
[Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed.

Just thought it would be worth raising the issue here before the dev version becomes a release, feel free to close if not?

Issues...

[22:22:45] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\entity\EntityDamageByEntityEvent' to 'CombatLogger v1.0.0': Argument 1 passed to Lambo\CombatLogger\Main::setTime() must be an instance of pocketmine\Player, instance of slapper\entities\SlapperHuman given, called in phar:///root/skywars/plugins/phar_CombatLogger_lXuNnU2X4rEkZqj.phar/src/Lambo/CombatLogger/Main.php on line 45 on Lambo\CombatLogger\Main

2 Questions:

  1. Is Tesseract supported?
  2. Is MCPE1.0.4 supported?

Create Poggit

Set up poggit so peeps can grab phars nice and easy.

Permission problem

Not sure why but when i use this plugin i can't log in to the server. i get the no permission to log in msg. Slapper seems to be effecting pureperms or simpleauth

Mobs aren't moving

I am able to spawn mobs, but none of them move. The chicken is the only one that doesn't stand completely still, it actually flaps it's wings. However none of the mobs move in any direction. I'm using the newest version of Slapper, the newest version of Pocketmine and the newest version of MCPE.

Ps. is it possible to make mobs spawn automatically?

"An unknown error.." when spawning a slapper

This is what happens in console

[20:17:56] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\Player::dataPacket() must be an instance of pocketmine\network\mcpe\protocol\DataPacket, instance of pocketmine\network\protocol\AddPlayerPacket given, called in /home/login/V2-PLUGINS/test_environment/plugins/Slapper-master/src/slapper/entities/SlapperHuman.php on line 77" (EXCEPTION) in "/src/pocketmine/Player" at line 1077

This is what happens in-game:
image

Slapper Change worlds.

## Before you tell me I know that I shouldn't have put this as an issue but how do you change worlds when taping on a slapper and when you do it have it say Server >> Teleporting...

Entity bug

Might not be related to slapper but i can't join my server onless i remove slapper. Any advice on what's the course?

[20:49:01] [Server thread/CRITICAL]: Could not tick level "suv": Call to a member function getValue() on null
[20:49:01] [Server thread/CRITICAL]: Error: "Call to a member function getValue() on null" (EXCEPTION) in "/src/pocketmine/entity/Human" at line 119
[20:49:01] [Server thread/DEBUG]: #0 /src/pocketmine/entity/Entity(1155): pocketmine\entity\Human->entityBaseTick(integer 1)
[20:49:01] [Server thread/DEBUG]: #1 /src/pocketmine/entity/Creature(67): pocketmine\entity\Entity->onUpdate(integer 790)
[20:49:01] [Server thread/DEBUG]: #2 /src/pocketmine/level/Level(771): pocketmine\entity\Creature->onUpdate(integer 790)
[20:49:01] [Server thread/DEBUG]: #3 /src/pocketmine/Server(2489): pocketmine\level\Level->doTick(integer 790)
[20:49:01] [Server thread/DEBUG]: #4 /src/pocketmine/Server(2685): pocketmine\Server->checkTickUpdates(integer 790, double 1487018941.4531)
[20:49:01] [Server thread/DEBUG]: #5 /src/pocketmine/Server(2379): pocketmine\Server->tick(boolean)
[20:49:01] [Server thread/DEBUG]: #6 /src/pocketmine/Server(2257): pocketmine\Server->tickProcessor(boolean)
[20:49:01] [Server thread/DEBUG]: #7 /src/pocketmine/Server(1849): pocketmine\Server->start(boolean)
[20:49:01] [Server thread/DEBUG]: #8 /src/pocketmine/PocketMine(451): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string /home/tolo/mc1/, string /home/tolo/mc1/, string /home/tolo/mc1/plugins/, string unknown)

Error code or not supported

I use pocketmine but its not working it tells something not supported on the main.php
Help fixing it please.

error on tap

when ever a player taps the slapper it gives this error on console":-

Server thread/CRITICAL Error: "Call to a member function sendContents() on null" (EXCEPTION) in "src/pocketmine/Player" at line 2419

Slapper Version 1.3.3 doesn't work

I need help the entities do not load it just comes getting this message in the console

2017-03-18 [Tesseract] �[10:43:05] CRITICAL> Unhandled exception executing command 'slapper spawn pig' in slapper: Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\Level, instance of pocketmine\level\format\Chunk given, called in phar:///home/gs/gs/data/servers/5060913/plugins/Slapper_v1.2.9.7.phar/src/slapper/Main.php on line 701�
2017-03-18 [Tesseract] �[10:43:05] CRITICAL> TypeError: "Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\Level, instance of pocketmine\level\format\Chunk given, called in phar:///home/gs/gs/data/servers/5060913/plugins/Slapper_v1.2.9.7.phar/src/slapper/Main.php on line 701" (EXCEPTION) in "/src/pocketmine/entity/Entity" at line 632

-

Trying to get help with another NPC plugin

FallingSand Slapper disappearing

When I put floating text(falling sand/block iD 0)
They disappear after a few hours. I have Slapper cache and rotation installed... But this used to happen before I installed them too. Any ideas?

Error

Unhandled exception executing command 'slapper create villager' in slapper: Call to undefined method pocketmine\Player::getSkinName()

Commands Don't Work

I am using PMMP and when I try to set a command such as tp for a slapped it says [Slapper] Unknown Command

API 3.0.0-ALPHA5 Compatibility

PocketMine-MP version 1.6.2dev "Unleashed" (API 3.0.0-ALPHA5)

Error: Class pocketmine\network\protocol\AddPlayerPacket not found
File: /src/spl/BaseClassLoader
Line: 144
Type: notice

THIS CRASH WAS CAUSED BY A PLUGIN

Code:

Backtrace:
#0 (): BaseClassLoader->loadClass(string pocketmine\network\protocol\AddPlayerPacket)
#1 /Slapper-master/src/slapper/entities/SlapperHuman(65): spl_autoload_call(string pocketmine\network\protocol\AddPlayerPacket)
#2 /src/pocketmine/Player(928): slapper\entities\SlapperHuman->spawnTo(pocketmine\Player Player(110))
#3 /src/pocketmine/Player(871): pocketmine\Player->doFirstSpawn(boolean)
#4 /src/pocketmine/Player(1733): pocketmine\Player->sendNextChunk(boolean)
#5 /src/pocketmine/Server(2379): pocketmine\Player->checkNetwork(boolean)
#6 /src/pocketmine/Server(2138): pocketmine\Server->tick(boolean)
#7 /src/pocketmine/Server(2021): pocketmine\Server->tickProcessor(boolean)
#8 /src/pocketmine/Server(1642): pocketmine\Server->start(boolean)
#9 /src/pocketmine/PocketMine(492): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///opt/PocketMine-MP-master/PocketMine-MP.phar/, string /opt/PocketMine-MP-master/, string /opt/PocketMine-MP-master/plugins/)
#10 (1): require_once(string phar:///opt/PocketMine-MP-master/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

PocketMine-MP version: 1.6.2dev #0 [Protocol 107; API 3.0.0-ALPHA5]

No commands when hitting

Commands don't work when hitting the entity.

When you use /slapper edit ID listcommands you can see that the command is attached to the slapper.
But when hitting the entity, nothing happens.

.phar file?!

Hello! Sry if this doesn't belong here but I can't find the .phar file of this plugin on this github...

Slapper not spawning

Server thread/CRITICAL Unhandled exception executing command 'slapper create villager' in slapper: Class pocketmine\network\protocol\AddEntityPacket not found

Slapper chunk error

Error occurrs when a player logs into the game.

The error produced:
Error: Argument 1 passed to slapper\entities\SlapperEntity::__construct() must be an instance of pocketmine\level\format\FullChunk, instance of pocketmine\level\format\generic\GenericChunk given, called in phar:///home/server/PocketMine-MP.phar/src/pocketmine/entity/Entity.php on line 625

PocketMine API: 3.0.0
PHP Version: 7.0.3
Zend version: 3.0.0
OS : Linux, linux

Error

Whenever I do /slapper spawn Human (ex. Hello Human)

It just says there was an error or something like that in light red how do I fix?

Class not found

I'm using PocketMine-MP 1.6.2dev-188 「Unleashed」 implementing API version 3.0.0-ALPHA5 for Minecraft: PE v1.1.0.55 (protocol version 113)

I got this error message
[00:17:02] [Server thread/INFO]: Enabling Slapper v1.3.5
[00:17:02] [Server thread/CRITICAL]: ClassNotFoundException: "Class slapper\entities\SlapperZombieVillager not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144
[00:17:02] [Server thread/INFO]: Disabling Slapper v1.3.5

Can you tell me what's the problem?

Server Crashing

My server is crashing every 10 minutes and I'm getting this crashdump error:

Error: Value 237 is too large!
File: /src/pocketmine/nbt/tag/ByteTag

The whole crashdump is:
https://ghostbin.com/paste/dbhs7

I'm using PocketMine-MP 1.6.2dev [ Unleashed ], 3.0.0-ALPHA5, Minecraft: PE v1.1.0.55

I hope you can fix this soon!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.