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

[KevinWang Plugin] The Plans of Developing Plugins

Comments in 'Plugin Development' started by VanishedKevin, Nov 9, 2013.

  1. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    Yea, but I don't know how to upload files. XD
  2. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Doorprotection is possible, and easy to make.
    But pocketmine isn't fast enough, so the player can still go through the door.
    You can fix this problem by protection a position so a player can't enter it, this will tp the player back.
  3. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Yes, but maybe you could do like player.block.touch and then replace those those x, y, and z coordinates with air
  4. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    Good idea, but how to detect the status of the door?
  5. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    can you do warp plugin please!
  6. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    There already is a warp plugin
  7. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    i know i just find it
  8. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    754
    Plugins:
    2
    Minecraft User:
    Darunia18
    I am just going to put a huge list of plugins that I have on my Bukkit server that could work and/or I would like to see. I may also repeat a few plugins listed before.

    AdminFun, AutoRank (or something that just runs a command from the console after a certain amount of time someone is logged on), AutorunCommands, BouncyBeds, DisguiseCraft/MobDisguise, dynmap (I'm not sure if this is possible at all), FrameProtect (but for paintings. I would just like to know if its possible or not for sometime in the future when item frames are added), iChat (but I believe stuff like this already exists), LogBlock (I know it exists, but it's really laggy. Any way it can connect to a MySQL database?), LWC (lock chests, doors, etc), mcMMO (very complex, but very fun!), MobArena, pvparena (the one made by the MobArena guys), MotdManager (or something to have multiple MOTDs and change them in-game or from the console), a permissions plugin that requires plugins to include an actual permission nodes, like "essentials.tp", some type of Spleef arena plugin (because I'm not sure if one exists yet), vanish, and Votifier.

    I know some have already been made by you Kevin, but let me explain a bit. First, I love what you've done with PocketEssentials, and I don't mind the src change too much, but I just don't want to use all of the features in PocketEssentials. And for any plugins suggested here, can you please release those as separate plugins? I'm just not a fan of forcing players to use all of your plugins even if they only need one. Thank you.
  9. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    You don't need the status of the door to protect it.
    But anyways, you can get the status of the door with the meta data of the bottom door block. I wrote a totally useless plugin to show you how:
    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=DoorInfo
    description=A totally useless plugin, it's just an example for in other plugins
    version=1.0
    author=wies
    class=DoorInfo
    apiversion=9,10
    */

    class DoorInfo implements Plugin{
        private 
    $api;
        public function 
    __construct(ServerAPI $api$server false){
            
    $this->api $api;
        }

        public function 
    init(){
            
    $this->api->addHandler("player.block.activate", array($this"block"));
        }

        public function 
    block($data){
            
    $meta $data['target']->getMetaData();
            if((
    $meta 0x08) === 0x08){ // check if the 4th bit of the meta data is 1 or in other words, check if the block is the top door block
                
    $data['player']->sendChat('You touched the top door block');
                
    $down $data['target']->getSide(0); // get the block underneath
                
    $meta $down->getMetaData(); // get the meta data from the block underneath
            
    }else{ // bottom door block
                
    $data['player']->sendChat('You touched the bottom door block');
            }
            if((
    $meta 0x04) === 0x04){ // check if the 3rd bit of the meta data is 1 or in other words, check if the door is open
                
    $data['player']->sendChat('You have opened the door');
            }else{
                
    $data['player']->sendChat('You have closed the door');
            }
        }

        public function 
    __destruct(){}
    }
    ?>
  10. Syriamanal
    Offline

    Syriamanal Ban Evader Banned

    Joined:
    Oct 2, 2013
    Posts:
    221
    Minecraft User:
    Syriamanal
    What's the plot me plugin u making wies
  11. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    But the door open data will be sent after client-side set the door to open status, so player may go through it when lag. How to fix it? I think MCPE use UDP is bad. XD
  12. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    @wies Do you know a little about AI? So we can make mob arena. :)
  13. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Yes that's what I was talking about, the player can still go through if he does it quickly. It hasn't anything to do with udp, minecraft pc uses udp too. You can fix this by protecting a area from entering (the 2x1 door block)
  14. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Yes, we can try it.
  15. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    Good idea, and I can detect the value in the server if door is closed then the area is locked! :D But how do I know the block where player stand before?

    But AI in 3D is verrrrrrrrrry difficult to implement because I know a little about this.
  16. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    I love math
  17. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    But math is just a part of the thing, one more is that you need to know some basic AI knowledge and that is the most difficult part. XD
  18. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    hmm.. first problem: how from how far does a zombie see you?
  19. dragonflex
    Offline

    dragonflex Banned

    Joined:
    Oct 2, 2013
    Posts:
    65
    Minecraft User:
    dragonflex123
    @wies help meee

    How to install pdo sqlite extension on vps (debian) (i need this because your plugin (plotpe) crashed my server :( )
  20. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    You may use triangle function(sin, cos, etc. ).

Share This Page

Advertisement