Skip to content

Commit

Permalink
hm
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBarii committed Mar 28, 2021
1 parent 5e902a4 commit 0d15d13
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 22 deletions.
1 change: 0 additions & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: ViaVersion
description: Allows 1.16.100 users to join a PMMP 3.17 Server
version: 1.0
main: ethaniccc\ViaVersion\ViaVersion
api: 3.17.0
Expand Down
23 changes: 2 additions & 21 deletions src/ethaniccc/ViaVersion/ViaVersion.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
a<?php
<?php

declare(strict_types=1);

Expand Down Expand Up @@ -207,23 +207,4 @@ public function leave(PlayerQuitEvent $event): void
{
unset($this->players[$event->getPlayer()->getName()]);
}
public function onAttack(EntityDamageByEntityEvent $ev)
{
$damaged = $ev->getEntity();
$damager = $ev->getDamager();

if($damaged instanceof Player && $damager instanceof Player)
{
if ($damaged->getGamemode() != 0 || $damaged->getGamemode() != 3)
{
$ev->setCancelled();
}
if ($damaged->getLevel() == "world")
{
$ev->setCancelled();
}
$damaged->knockBack($damager, $ev->getFinalDamage(), (float)$damaged->getX(), (float) $damaged->getZ());

}
}
}
}
2 changes: 2 additions & 0 deletions src/ethaniccc/ViaVersion/hacks/v419/PlayerListPacket419.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace ethaniccc\ViaVersion\hacks\v419;

use pocketmine\network\mcpe\protocol\PlayerListPacket;
Expand Down
2 changes: 2 additions & 0 deletions src/ethaniccc/ViaVersion/hacks/v428/PlayerListPacket428.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace ethaniccc\ViaVersion\hacks\v428;

use pocketmine\network\mcpe\protocol\PlayerListPacket;
Expand Down
2 changes: 2 additions & 0 deletions src/ethaniccc/ViaVersion/hacks/v428/SkinData428.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace ethaniccc\ViaVersion\hacks\v428;

use pocketmine\network\mcpe\protocol\types\SkinData;
Expand Down
2 changes: 2 additions & 0 deletions src/ethaniccc/ViaVersion/hacks/v428/StartGamePacket428.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace ethaniccc\ViaVersion\hacks\v428;

use pocketmine\nbt\NetworkLittleEndianNBTStream;
Expand Down

0 comments on commit 0d15d13

Please sign in to comment.