1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

[solved] Chest Vault -personal /private chest in one command

Discussion in 'Requests' started by MC ATECH, Apr 23, 2017.

?

Is this plugin idea even possible?

  1. yeah!

    13 vote(s)
    68.4%
  2. impossible

    1 vote(s)
    5.3%
  3. yes, with time and dedication!

    5 vote(s)
    26.3%
  1. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    Hello!
    I dont believe this plugin exists so im requesting its existence :p
    I would like a plugin called 'Chest Vault' to be made to supply a user/player with a private vault. This would be achieved through hitting an enderchest or by typing /cv into chat. The idea behind this plugin is to allow a user to store ingame winnings in a chest which they can come back to once relogging. The command to open the chest would be /cv [number] (number being the vault page chosen like 1-10) When hitting a enderchest a gui will pop-up on the screen and have a number on it. I've seen things like this called vaults on the computer.
    If this plugin (or something similar exists im sorry for wasting time and would like a link).
    Thanks,
    MC ATECH
     
    Last edited by a moderator: Apr 23, 2017
    rektpixel likes this.
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    it's quite possible to achieve there's have been a faulty private plugin called "private vault" would be a good one to start as an concept but there's issues generally around destroying blocks since the players cant have virtual inventory(unless you make a client sided chest out of packets, but who knows how the server anti cheat will respond to this)
    an idea for others who are interested in making this is to aim for it to be able to open using enderchest/chest, the open via command part can be confusing and harder
     
    HimbeersaftLP and MC ATECH like this.
  3. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    MC ATECH likes this.
  4. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    Yeah, I know about this plugin. It's just too different to edit or to fork due to the differences I want :p
     
  5. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    I can edit it for you if you want. What do you want for changes?
     
    MC ATECH likes this.
  6. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    How kind!
    Basically everything I mentioned at the start of the post! :3
    •But maybe; could there be pages added? Green wool and maybe red wool for back and forth..
    •Would it be possible for a sell block like item 246:8 in the top of the chest which works with another plugin called Sell so when a player taps it he/she sell the whole chests contents? (Just an idea)
    •The chest either costs money to buy in the first place or say $200 to use each time
    •opening/closing message telling the player if they spent money
    •maybe make it a double chest gui instead of single?

    Lol loads of possibilités but the main aim is to make it like my first post on this.. (ChestVault)
    Please reply with what is possible. :)
    Thanks.
     
  7. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
  8. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
  9. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    PHP:
    [PocketMine] > Unhandled exception executing command 'pv 0' in pvArgument 2 passed to pocketmine\tile\Tile::createTile() must be an instance of pocketmine\level\Levelinstance of pocketmine\level\format\Chunk givencalled in phar://C:/Users/mc8at/Desktop/TNT run server/plugins/phar_PrivateVaults-master (1)_CfjcRBtNQseZgR4.phar/src/KairusDarkSeeker/PrivateVaults/PrivateVaults.php on line 109
    [PocketMine] > TypeError"Argument 2 passed to pocketmine\tile\Tile::createTile() must be an instance of pocketmine\level\Level, instance of pocketmine\level\format\Chunk given, called in phar://C:/Users/mc8at/Desktop/TNT run server/plugins/phar_PrivateVaults-master (1)_CfjcRBtNQseZgR4.phar/src/KairusDarkSeeker/PrivateVaults/PrivateVaults.php on line 109" (EXCEPTIONin "/src/pocketmine/tile/Tile" at line 102
    error... :) It might because i ran it on a server thats software wasn't pm..
     
  10. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Use the instance of level, don't of chunk:
    $blabalbal->getLevel()
    don't $blablalba->getChunk();
     
    MC ATECH likes this.
  11. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    thanks
     
  12. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Add the [Solved] tag to the title when you don't need this anymore (your question is answered/you found the perfect plugin).
     
  13. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    ill do tht once its working :p
     
  14. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    The plugin is already using ->getlevel()
    PHP:
                $chest $event->getPlayer()->getLevel()->getTile(new Position($event->getPlayer()->x$event->getPlayer()->y$event->getPlayer()->z));
     
  15. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    PHP:
            $nbt->Items->setTagType(NBT::TAG_Compound);
            
    $tile Tile::createTile("Chest"$player->getLevel()->getChunk($player->getX() >> 4$player->getZ() >> 4), $nbt);
            if(
    $player instanceof Player) {
                
    $player $player->getName();
            }
    Still not working.. help?
     
  16. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    BTW that plugin seems to originate form the "PrivateVault" i mentioned, it's just some of it's code is tweaked to include their author name even tho they did not originally made it
    there's a few obvious flaw, like this one sets the chest at block 128 which may destroy building blocks
    and i doubt there's any checks so it will run into loosing items if i open a vault in the same X,Z cords of another player
     
  17. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    Still not working.. Once i get it working im gonna edit it :p
     
  18. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    Can't get it working.. :/
     
  19. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    Your answer is in the error. -.-
    PHP:
            $nbt->Items->setTagType(NBT::TAG_Compound);
            
    $tile Tile::createTile("Chest"$player->getLevel(), $nbt);
            if(
    $player instanceof Player) {
                
    $player $player->getName();
            }
    The second argument of Tile::createTile() needs to be a Level, not a chunk.
     
    Primus likes this.
  20. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    thats the code which creates the error ..
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.