Skip to content

Commit

Permalink
v2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavius12 committed Aug 31, 2015
1 parent 25a3fd8 commit 4ee90d8
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ServerAuth/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ServerAuth
main: ServerAuth\ServerAuth
version: "2.00"
version: "2.10"
api: [1.11.0]
load: STARTUP
author: EvolSoft
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/ChangePassword.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:27 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Commands.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:31 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Logout.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:56 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Register.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 11:03 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Unregister.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 11:09 AM (UTC)
Expand Down
26 changes: 18 additions & 8 deletions ServerAuth/src/ServerAuth/EventListener.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 01:25 PM (UTC)
* Date: 31/08/2015 05:39 PM (UTC)
* Copyright & License: (C) 2015 EvolSoft
* Licensed under MIT (https://github.com/EvolSoft/ServerAuth/blob/master/LICENSE)
*/
Expand Down Expand Up @@ -33,6 +33,7 @@
use pocketmine\Server;

use ServerAuth\ServerAuth;
use pocketmine\event\entity\EntityDamageByEntityEvent;

class EventListener implements Listener {

Expand All @@ -54,10 +55,8 @@ public function onPreLogin(PlayerPreLoginEvent $event){
}
}
if($count > 1){
if(ServerAuth::getAPI()->isPlayerAuthenticated($player)){
$player->close($this->plugin->translateColors("&", ServerAuth::getAPI()->getConfigLanguage()->getAll()["single-auth"]), $this->plugin->translateColors("&", ServerAuth::getAPI()->getConfigLanguage()->getAll()["single-auth"]), false);
$event->setCancelled(true);
}
$player->close("", $this->plugin->translateColors("&", ServerAuth::getAPI()->getConfigLanguage()->getAll()["single-auth"]), $this->plugin->translateColors("&", ServerAuth::getAPI()->getConfigLanguage()->getAll()["single-auth"]), false);
$event->setCancelled(true);
}
}
}
Expand Down Expand Up @@ -169,8 +168,19 @@ public function onBucketEmpty(PlayerBucketEmptyEvent $event){
}
public function onEntityDamage(EntityDamageEvent $event){
if(!ServerAuth::getAPI()->isPlayerRegistered($event->getPlayer()->getName()) || !ServerAuth::getAPI()->isPlayerAuthenticated($event->getPlayer())){
$event->setCancelled(true);
$player = $event->getEntity();
if($player instanceof Player){
if(!ServerAuth::getAPI()->isPlayerRegistered($player->getName()) || !ServerAuth::getAPI()->isPlayerAuthenticated($player)){
$event->setCancelled(true);
}
}
if($event instanceof EntityDamageByEntityEvent){
$damager = $event->getDamager();
if($damager instanceof Player){
if(!ServerAuth::getAPI()->isPlayerRegistered($damager->getName()) || !ServerAuth::getAPI()->isPlayerAuthenticated($damager)){
$event->setCancelled(true);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:17 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:19 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:22 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:22 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 12:49 AM (UTC)
Expand Down
6 changes: 3 additions & 3 deletions ServerAuth/src/ServerAuth/ServerAuth.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 02:50 PM (UTC)
* Date: 31/08/2015 05:26 PM (UTC)
* Copyright & License: (C) 2015 EvolSoft
* Licensed under MIT (https://github.com/EvolSoft/ServerAuth/blob/master/LICENSE)
*/
Expand All @@ -28,7 +28,7 @@ class ServerAuth extends PluginBase {
const PRODUCER = "EvolSoft";

/** @var string VERSION Plugin version */
const VERSION = "2.00";
const VERSION = "2.10";

/** @var string MAIN_WEBSITE Plugin producer website */
const MAIN_WEBSITE = "http://www.evolsoft.tk";
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Tasks/MessageTask.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 30/08/2015 11:29 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Tasks/MySQLTask.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.10) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 14/05/2015 05:19 PM (UTC)
Expand Down

0 comments on commit 4ee90d8

Please sign in to comment.