I am making a plugin that kicks players from the game when they kill another player. I have the code written but I need someone who knows what they're doing to look at it, and tell me if I messed and where I messed up. If anyone could help me, start a thread with me and i'll give you the code. Thanks
And you are starting a thread asking people to start a thread to ask you while you are the one asking? Why don't you just put the code here?
https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L44 Undefined variable $eventPvP https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L44 It is EntityDamagedByEntityEvent https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L65 I think public is implicit, but better add the modifier back. https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L65 Read the docs at http://jenkins.pocketmine.net/job/PocketMine-MP-Doc/doxygen or the PocketMine source at https://github.com/PocketMine/PocketMine-MP/tree/master/src/pocketmine/event . You can find all the events in these places. It is PlayerDeathEvent. https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L67 Check $event->getEntity()->getLastDamageCause() instanceof EntityDamageByEntityEvent https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L71 You are checking the same thing twice? https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L75 Undefined field OPKilling. Do you know what you are doing? https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L75 What is !$player == OP? If you want to check unequal, use $a != $b not !$a == $b Undefined constant OP Use $player->isOp() instead Generally, in plugins, you should check whether the player has a certain permission node rather than whether the player is op. https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L80 What? Remove? You should use $player->kick() for kicking, and they should not be in a chained call. https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L81-83 What are these? https://github.com/Blubberboy333/KillBan/blob/master/src/bluberboy/main.php#L86 Seems like you have a double indent?
PHP: Player $player->hasPermission("permission.node"); Example: PHP: if($player->hasPermission("hi"){ $player->sendPopup("HI!");}