Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Fludixx authored Jul 7, 2018
1 parent 3bc50b8 commit ef55c3a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: WoolBattle
main: Fludixx\WoolBattle\Main
version: 1.1
version: 1.1.1
api: [3.0.0-ALPHA12, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5]
author: Fludixx
description: WoolBatlle Plugin for pmmp
Expand Down
31 changes: 20 additions & 11 deletions src/Fludixx/WoolBattle/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Main extends PluginBase implements Listener{
public $prefix = f::WHITE . "Wool" . f::GREEN . "Battle" . f::GRAY . " | " . f::WHITE;
public $zuwenig = false;
public $setup = 0;
public $kabstand = 3;

public function onEnable() {
$this->getServer()->getPluginManager()->registerEvents($this,$this);
Expand Down Expand Up @@ -73,6 +74,14 @@ public function onEnable() {
$arena->set("spawnz", 1);
$arena->save();
}
$perks = new Config("/cloud/cfg/perks.yml", Config::YAML);
if(!$perks || !$perks->get("kapsel_y")) {
@mkdir("/cloud/cfg/");
$perks = new Config("/cloud/cfg/perks.yml", Config::YAML);
$perks->set("kapsel_y", 3);
}
$this->kabstand = (int)$perks->get("kapsel_y");

//Loading and Setting up levels
$this->getServer()->loadLevel("lobby");
$this->getServer()->getLevelByName("lobby")->setAutoSave(false);
Expand Down Expand Up @@ -760,63 +769,63 @@ public function onInteract(PlayerInteractEvent $event) {
} else {
$rand = Block::get(35, 11);
}
// RetungsKapsel
// RettungsKapsel
$x = $player->getX();
$y = $player->getY();
$z = $player->getZ();
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level = $player->getLevel();
$level->setBlock($pos, $block);
$x = $player->getX()+1;
$y = $player->getY();
$z = $player->getZ();
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $block);
$x = $player->getX()-1;
$y = $player->getY();
$z = $player->getZ();
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $block);
$x = $player->getX();
$y = $player->getY();
$z = $player->getZ()-1;
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $block);
$x = $player->getX();
$y = $player->getY();
$z = $player->getZ()+1;
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $block);
$x = $player->getX()+1;
$y = $player->getY();
$z = $player->getZ()+1;
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $rand);
$x = $player->getX()-1;
$y = $player->getY();
$z = $player->getZ()-1;
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $rand);
$x = $player->getX()+1;
$y = $player->getY();
$z = $player->getZ()-1;
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $rand);
$x = $player->getX()-1;
$y = $player->getY();
$z = $player->getZ()+1;
$y = $y-3;
$y = $y-(int)$this->kabstand;
$pos = new Vector3($x, $y, $z);
$level->setBlock($pos, $rand);
// RetungsKapsel Ende
// RettungsKapsel Ende

}
if ($item->getCustomName() == f::GOLD . "Stats") {
Expand Down

0 comments on commit ef55c3a

Please sign in to comment.