Skip to content

Commit

Permalink
1.1.1 update + fixed MapReset 👍
Browse files Browse the repository at this point in the history
  • Loading branch information
VixikHD committed Jun 1, 2019
1 parent 384a2c2 commit de1c1be
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 20 deletions.
18 changes: 9 additions & 9 deletions SkyWars/src/vixikhd/skywars/SkyWars.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -82,12 +82,12 @@ public function onChat(PlayerChatEvent $event) {
case "help":
$player->sendMessage("§a> SkyWars setup help (1/1):\n".
"§7help : Displays list of available setup commands\n" .
"§7slots : Update arena slots\n".
"§7level : Set arena level\n".
"§7spawn : Set arena spawns\n".
"§7joinsign : Set arena joinsign\n".
"§7slots : Updates arena slots\n".
"§7level : Sets arena level\n".
"§7spawn : Sets arena spawns\n".
"§7joinsign : Sets arena join sign\n".
"§7savelevel : Saves the arena level\n".
"§7enable : Enable the arena");
"§7enable : Enables the arena");
break;
case "slots":
if(!isset($args[1])) {
Expand Down Expand Up @@ -127,12 +127,12 @@ public function onChat(PlayerChatEvent $event) {
$player->sendMessage("§a> Spawn $args[1] set to X: " . (string)round($player->getX()) . " Y: " . (string)round($player->getY()) . " Z: " . (string)round($player->getZ()));
break;
case "joinsign":
$player->sendMessage("§a> Break block to set joinsign!");
$player->sendMessage("§a> Break block to set join sign!");
$this->setupData[$player->getName()] = 0;
break;
case "savelevel":
if(!$arena->level instanceof Level) {
$player->sendMessage("§c> Error when saving level: world not found.");
$player->sendMessage("§c> Error while saving the level: world not found.");
if($arena->setup) {
$player->sendMessage("§6> Try save level after enabling the arena.");
}
Expand All @@ -153,7 +153,7 @@ public function onChat(PlayerChatEvent $event) {
$player->sendMessage("§a> Arena enabled!");
break;
case "done":
$player->sendMessage("§a> You are successfully leaved setup mode!");
$player->sendMessage("§a> You are successfully left setup mode!");
unset($this->setters[$player->getName()]);
if(isset($this->setupData[$player->getName()])) {
unset($this->setupData[$player->getName()]);
Expand Down
6 changes: 2 additions & 4 deletions SkyWars/src/vixikhd/skywars/arena/Arena.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -436,7 +436,7 @@ public function onLevelChange(EntityLevelChangeEvent $event) {
$player = $event->getEntity();
if(!$player instanceof Player) return;
if($this->inGame($player)) {
$this->disconnectPlayer($player, "You are successfully leaved arena!");
$this->disconnectPlayer($player, "You have successfully left the arena!");
}
}

Expand All @@ -459,8 +459,6 @@ public function loadArena(bool $restart = false) {
if(!$this->plugin->getServer()->isLevelLoaded($this->data["level"])) {
$this->plugin->getServer()->loadLevel($this->data["level"]);
}

$this->mapReset->saveMap($this->level = $this->plugin->getServer()->getLevelByName($this->data["level"]));
}


Expand Down
2 changes: 1 addition & 1 deletion SkyWars/src/vixikhd/skywars/arena/ArenaScheduler.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion SkyWars/src/vixikhd/skywars/arena/MapReset.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion SkyWars/src/vixikhd/skywars/commands/SkyWarsCommand.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion SkyWars/src/vixikhd/skywars/math/Time.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion SkyWars/src/vixikhd/skywars/math/Vector3.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions SkyWars/src/vixikhd/skywars/provider/YamlDataProvider.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2018 GamakCZ
* Copyright 2018-2019 GamakCZ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -74,7 +74,7 @@ public function saveArenas() {
}
$config = new Config($this->getDataFolder() . "arenas" . DIRECTORY_SEPARATOR . $fileName . ".yml", Config::YAML);
$config->setAll($arena->data);
$config->save(\false);
$config->save(false);
}
}

Expand Down

1 comment on commit de1c1be

@yichifauzi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing gamak i still like you!

Please sign in to comment.