Skip to content

Commit fe4787f

Browse files
authored
Merge pull request #98 from xZeroMCPE/Beta
Tuned some stuff!
2 parents 08d1785 + 5bbde2a commit fe4787f

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ This is not just another SurvivalGame plugin. This plugin aims to bring a fully
2525
- Easy arena setup
2626
- Per Arena Permissions
2727
- Lightning and thunder on player deaths (Simulate cannons)
28-
- Multiworld Support
28+
- MultiWorld Support
29+
- MultiLanguage Suppoer
2930
- Events API - Economy, Kits + More!
3031
Plus many, many more features included in this plugin!
32+
33+
Language
34+
--------
35+
36+
SurvivalGames gives server owners a chance to use any language as possible. If you are wanting to help us you may create any languages file that does not exist and create a "Pull Request" and we"ll sure merge it. We are trying to make SurvivalGames support as much language as posibble. The more the "better".

src/Andre/SurvivalGames/Main.php

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
class Main extends PluginBase implements Listener
3838
{
3939
public $data;
40-
40+
public $version = "1.0.10"
4141
private static $object = null;
4242
4343
public static function getInstance(){
@@ -170,13 +170,20 @@ public function onEnable() {
170170
$this->SetStatus=array();
171171
$this->all=0;
172172
$this->config->save();
173-
$this->getServer()->getLogger()->info(TextFormat::YELLOW."------------------------------");
174-
$this->getServer()->getLogger()->info(TextFormat::RED."SurvivalGames has been §eenabled");
175-
$this->getServer()->getLogger()->info(TextFormat::RED."Config: §eLoaded !");
176-
$this->getServer()->getLogger()->info(TextFormat::RED."Developer: §exZeroMCPE §e@xZeroMCPE");
177-
$this->getServer()->getLogger()->info(TextFormat::YELLOW."------------------------------");
178-
179-
173+
$version = $this->version;
174+
$this->getServer()->getLogger()->info("§b
175+
*
176+
*
177+
* _____ _ _ _____
178+
/ ____| (_) | |/ ____|
179+
| (___ _ _ _ ____ _____ ____ _| | | __ __ _ _ __ ___ ___ ___
180+
\___ \| | | | '__\ \ / / \ \ / / _` | | | |_ |/ _` | '_ ` _ \ / _ \/ __|
181+
____) | |_| | | \ V /| |\ V / (_| | | |__| | (_| | | | | | | __/\__ \
182+
|_____/ \__,_|_| \_/ |_| \_/ \__,_|_|\_____|\__,_|_| |_| |_|\___||___/
183+
*
184+
* §cGitHub:§e GitHub.com/xZeroMCPE/SurvivalGames
185+
* §cUsing version: $version
186+
");
180187
}
181188

182189

@@ -261,15 +268,15 @@ public function onCommand(CommandSender $sender, Command $command, $label, array
261268
$sender->sendMessage("$No_Permission");
262269
return true; }
263270
}else{
264-
$sender->sendMessage(TextFormat::RED . "§d§oPlease use the command in game!!");
271+
$sender->sendMessage(TextFormat::RED . "That command can only be used in-game!");
265272
return true;
266273
}
267274
break;
268275
case "set":
269276
if($sender instanceof Player){
270277
if($this->config->exists("lastpos"))
271278
{
272-
$sender->sendMessage("§cAn arena has already been setup, remove the existing one first");
279+
$sender->sendMessage("TextFormat::BLUE . "Seems like you have already setup an arena");
273280
}
274281
else
275282
{
@@ -314,7 +321,7 @@ public function onCommand(CommandSender $sender, Command $command, $label, array
314321
$sender->sendMessage(TextFormat::GREEN . "Game settings successfully removed.");
315322
break;
316323
case "start":
317-
Server::getInstance()->broadcastMessage(TextFormat::BLUE. "$Force_Start");
324+
$this->getServer()->broadcastMessage(TextFormat::BLUE. "$Force_Start");
318325
$this->gameStatus=1;
319326
$this->lastTime=5;
320327
break;
@@ -385,15 +392,15 @@ public function onCommand(CommandSender $sender, Command $command, $label, array
385392
{
386393
$this->config->set("prefix","Game");
387394
}
388-
$this->gameTime=(int)$this->config->get("gameTime");//how long a match is
395+
$this->gameTime=(int)$this->config->get("gameTime");
389396
$this->prefix=(int)$this->config->get("prefix");
390-
$this->gameStatus=0;//status of the game (sign)
391-
$this->lastTime=0;//just a variable :P
392-
$this->players=array();//players
397+
$this->gameStatus=0;
398+
$this->lastTime=0;
399+
$this->players=array();
393400
$this->SetStatus=array();
394401
$this->all=0;//
395402
$this->config->save();
396-
$sender->sendMessage(TextFormat::GREEN. "SurvivalGamess config has been reloaded");
403+
$sender->sendMessage(TextFormat::GREEN. "All SurvivalGames configuration has been reloaded");
397404
break;
398405
default:
399406
return false;
@@ -1120,7 +1127,7 @@ public function playerBlockTouch(PlayerInteractEvent $event){
11201127
}else{
11211128
if(!$event->getPlayer()->hasPermission("sg.touch.startgame"))
11221129
{
1123-
$event->getPlayer()->sendMessage("You don't have permission to join this game.");
1130+
$event->getPlayer()->sendMessage("You don't have permission to do that!\nContact the server administration");
11241131
}else{
11251132

11261133
if($this->gameStatus==0 || $this->gameStatus==1)
@@ -1151,7 +1158,7 @@ public function playerBlockTouch(PlayerInteractEvent $event){
11511158
}
11521159
else
11531160
{
1154-
$event->getPlayer()->sendMessage(TextFormat::RED. "[{$this->getConfig()->get("prefix")}] Please leave server, to quit match!");
1161+
$event->getPlayer()->sendMessage(TextFormat::RED. "[{$this->getConfig()->get("prefix")}] You are already in an arena");
11551162
}
11561163
}
11571164
else
@@ -1188,10 +1195,9 @@ public function PlayerQuit(PlayerQuitEvent $event){
11881195
}
11891196

11901197
public function onDisable(){
1191-
$this->getServer()->getLogger()->info(TextFormat::GREEN."[SG] Saving All Data...");
11921198
$this->saveResource("config.yml");
11931199
$this->saveResource("points.yml");;
1194-
$this->getServer()->getLogger()->info(TextFormat::GREEN."[SG] All files was saved");
1200+
$this->getServer()->getLogger()->info(TextFormat::GREEN."All configuration has been saved!");
11951201
}
11961202
}
11971203
?>

0 commit comments

Comments
 (0)