Created
June 20, 2017 08:37
-
-
Save jojoe77777/bf7d11564a43d83de4eef15bc1cda691 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($ev->isCancelled()) return; | |
$didItWork = "No"; | |
$isInvalid = "No"; | |
$asConsole = "No"; | |
$taker = $ev->getEntity(); | |
$giver = $ev->getDamager(); | |
if (!($taker instanceof Player)){ $takerSaveId = $taker->getSaveId(); } | |
if (($taker instanceof Player)){ $takerSaveId = "Player"; } | |
if(($takerSaveId == "Human")){ if(!$giver->hasPermission("slapper.hit")){ $didItWork = "Yes"; } $ev->setCancelled(); } | |
if(($takerSaveId == "Item")){ $isInvalid = "Yes"; } | |
if($isInvalid == "No"){ | |
if(!($ev instanceof EntityDamageByChildEntityEvent)){ | |
if(!($ev instanceof EntityDamageByBlockEvent)){ | |
if (($taker instanceof Player)) return; | |
if(!($takerSaveId == "Human")){ $isInvalid = "Yes"; } | |
$takerName = $taker->getName(); | |
// lost the rest of it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment