Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BattleKits 1.0.4

The awesome kit plugin, now for PocketMine!

  1. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    How do you add new kits????? Can somone make a sample? Also how do you enable it for every world? The description sounds sooooo confusing...
  2. jasonhua
    Offline

    jasonhua New Member

    Joined:
    Jan 18, 2015
    Posts:
    13
    Minecraft User:
    jason
    I think,You should refer to what is said above
  3. Exxarion
    Offline

    Exxarion Active Member Plugin Developer

    Joined:
    Jan 5, 2014
    Posts:
    242
    Plugins:
    1
    Minecraft User:
    Notch
    Ok, so I am using this plugin with an economy, and it works great... only one problem.

    If a player does not have enough money for a kit, they can still get it, and it subtracts no money.
  4. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    I do not use any permission plugins like PurePerms because it is hard to use. Does it work because it says to non-ops You do not have the permission.....
    64FF00 likes this.
  5. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Falk, I hope you are reading this. Permission error is in here:
    PHP:
    <?php
    namespace battlekits\sign;

    use 
    battlekits\BattleKits;
    use 
    pocketmine\event\block\SignChangeEvent;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\event\player\PlayerInteractEvent;
    use 
    pocketmine\tile\Sign;

    class 
    SignListener implements Listener{
        
    /** @var BattleKits  */
        
    private $plugin;
        public function 
    __construct(BattleKits $plugin){
            
    $this->plugin $plugin;
            
    $this->getPlugin()->getServer()->getPluginManager()->registerEvents($this$this->getPlugin());
        }
        public function 
    onSignChange(SignChangeEvent $event){
            if(
    $event->getLine(0) === $this->getPlugin()->getConfig()->get('sign-trigger')){
                if(
    $event->getPlayer()->hasPermission("battlekits.sign.create")){
                    if(!empty(
    $event->getLine(1))){
                        
    $event->getPlayer()->sendMessage("You have successfully created kit sign.");
                    }
                    else{
                        
    $event->getPlayer()->sendMessage("You must set a kit.");
                        
    $event->setCancelled();
                    }
                }
                else{
                    
    $event->getPlayer()->sendMessage("You don't have permission to make kit signs.");
                    
    $event->setCancelled();
                }
            }
        }
        public function 
    onInteract(PlayerInteractEvent $event){
            
    $sign $event->getPlayer()->getLevel()->getTile($event->getBlock());
            if(
    $sign instanceof Sign){
                
    $text $sign->getText();
                if(
    $text[0] === $this->getPlugin()->getConfig()->get('sign-trigger') && !empty($text[1])){
                    if(
    $event->getPlayer()->hasPermission("battlekits.sign.create")){
                        
    $this->getPlugin()->getKitPaymentController()->grantKit($text[1], $event->getPlayer());
                    }
                    else{
                        
    $event->getPlayer()->sendMessage("You don't have permission to use kit signs.");
                    }
                }
            }
        }
        
    /**
         * @return \battlekits\BattleKits
         */
        
    public function getPlugin(){
            return 
    $this->plugin;
        }
    }
    It should be "battlekits.sign.use"
    If someone is lazy, here is the copy I edited.
    BTW, this is in Battlekits\src\battlekits\sign\SignListener.php

    Attached Files:

    Falk likes this.
  6. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Thanks. I will get an update out ASAP.
    Last edited: May 12, 2015
    LDX likes this.
  7. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    You know, permissions node is an easy thing to get wrong. Thanks for going to update it!
    64FF00 likes this.
  8. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
  9. Goerick
    Offline

    Goerick Active Member

    Joined:
    Jan 24, 2014
    Posts:
    250
    Minecraft User:
    goerick
    Can you put an example using 2 kits in yml? Im having a bit of a trouble here.
  10. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    I have 20 kits already... XD
  11. Goerick
    Offline

    Goerick Active Member

    Joined:
    Jan 24, 2014
    Posts:
    250
    Minecraft User:
    goerick
    Yeah thing is it says it says in console it has 3 kits, yet when I do /battle kits name it doesn't work, only the first kit does.
  12. Goerick
    Offline

    Goerick Active Member

    Joined:
    Jan 24, 2014
    Posts:
    250
    Minecraft User:
    goerick
    Can you give me an example?
  13. FullVip
    Offline

    FullVip New Member

    Joined:
    Apr 19, 2015
    Posts:
    6
    Minecraft User:
    FullVip
    what are the permission nodes for this plugin?
  14. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    how can i let a player(no OP) to use kits(without OPing them or setting perms{i dont think i am ready for xperms and all dat])
  15. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Yes. I am working on a mind reading plugin that will let you do this without you having to do anything. I hope you don't mind installing a USB port on top of your head for best low noise communications.

    :)
    Onetwo3, PEMapModder and Falk like this.
  16. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    YES that will do but why it require a USB port??
  17. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    btw do kits have custom nodes
    like: battlekits.sign.use<kit name>?
  18. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    and WHY the kit archer keep existing?
    idk how to get rid of it any one have idea???
  19. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    Add kits for VIP users :3
    jojoe77777 likes this.
  20. ZacHack
    Offline

    ZacHack Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    325
    Plugins:
    6
    Minecraft User:
    _ZacHack_
    i get an error whenever i edit the config and it disables the plugin
    Falk likes this.

Share This Page

Advertisement