Skip to content

Commit

Permalink
Version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavius12 committed Dec 29, 2014
1 parent c928902 commit 2fec722
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/ServerKits/Commands/Kit.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/*
* KitPro (v1.1) by EvolSoft
* ServerKits (v1.2) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 27/12/2014 04:00 PM (UTC)
* Date: 29/12/2014 09:43 AM (UTC)
* Copyright & License: (C) 2014 EvolSoft
* Licensed under MIT (https://github.com/EvolSoft/KitPro/blob/master/LICENSE)
* Licensed under MIT (https://github.com/EvolSoft/ServerKits/blob/master/LICENSE)
*/

namespace KitPro\Commands;
namespace ServerKits\Commands;

use pocketmine\plugin\PluginBase;
use pocketmine\permission\Permission;
Expand All @@ -19,8 +19,8 @@
use pocketmine\Player;
use pocketmine\utils\TextFormat;

use KitPro\Main;
use KitPro\EventListener;
use ServerKits\Main;
use ServerKits\EventListener;

class Kit extends PluginBase implements CommandExecutor{

Expand All @@ -34,7 +34,7 @@ public function onCommand(CommandSender $sender, Command $cmd, $label, array $ar
case "kit":
//Player Sender
if($sender instanceof Player){
if($sender->hasPermission("kitpro.commands.kit")){
if($sender->hasPermission("serverkits.commands.kit")){
//Initialize kit permissions
$this->plugin->initializeKitsPermissions();
//Check if use-permissions is enabled
Expand All @@ -43,7 +43,7 @@ public function onCommand(CommandSender $sender, Command $cmd, $label, array $ar
//Check if kit exists
if($this->plugin->KitExists($args[0])){
//Check if player has kit permissions
if($sender->hasPermission("kitpro.kit." . strtolower($args[0]))){
if($sender->hasPermission("serverkits.kit." . strtolower($args[0]))){
$status = $this->plugin->giveKit($sender, $args[0]);
if($status == 0){
$sender->sendMessage($this->plugin->translateColors("&", Main::PREFIX . $this->plugin->getKitReceivedMessage($sender, $args[0])));
Expand All @@ -64,12 +64,12 @@ public function onCommand(CommandSender $sender, Command $cmd, $label, array $ar
$sender->sendMessage($this->plugin->translateColors("&", Main::PREFIX . "&4Available Kits:"));
$kits = $this->plugin->getAllKits();
$result = "";
if($sender->hasPermission("kitpro.kit." . strtolower($kits[0]))){
if($sender->hasPermission("serverkits.kit." . strtolower($kits[0]))){
$result = $kits[0];
}
//Count all kits
for($i = 1; $i < count($kits); $i++){
if($sender->hasPermission("kitpro.kit." . strtolower($kits[$i]))){
if($sender->hasPermission("serverkits.kit." . strtolower($kits[$i]))){
$result = $result . ", " . $kits[$i];
}
}
Expand Down

0 comments on commit 2fec722

Please sign in to comment.