GunsAPI

GunsAPI

About

This is an API that allows developers to easily create gun plugins. It comes with several methods that you can call to shoot a gun, shoot a RPG, throw a grenade, or shoot a shotgun. There are 4 bullet types that you can choose from.

  1. Ender pearl
  2. Snowball
  3. Egg
  4. Arrow This plugin does not have any config, Permissions, or commands.

How to use

For server owners: You would only need this plugin if another plugin told you that it is needed. To install:

  1. Download
  2. Place in your plugins folder
  3. Reload or start your server.
  4. Done

For developers:

Methods

  • setExplosionCancel(boolean cancel)
  • setEnderPearlTeleportCancel(boolean cancel)
  • shootGun(double Damage, Player shooter, Vector volocity, BulletType bulletType, boolean sound)
  • shootRPG(double Damage, Player shooter, Vector volocity, BulletType bulletType, double Explosion, boolean sound)
  • shootGrenade(double Damage, Player shooter, Vector volocity, BulletType bulletType, double Explosion, boolean sound)
  • shootShootgun(double Damage, Player shooter, Vector volocity, BulletType bulletType, int Shells, boolean sound)

Events

  • GunHitEvent - This is called when a bullet, grenade, or RPG hits something. (Ground or entity) This event is cancellable. GunHitEvent's methods:
  • getGun() - returns Gun
  • getVelocity() - returns vector
  • getShooter() - returns Player
  • getDamage() - returns double
  • getBulletType() - returns BulletType
  • getExplosion() - returns double
  • getBullet() - returns Entity
  • isCancelled() - returns if it is canceled
  • setCancelled(boolean cancel) - sets if it is canceled
  • setGun(Gun gun) - sets Gun
  • setVelocity(Vector velocity) - set velocity
  • setDamage(double Damage) - set damage
  • setBulletType(BulletType bullet) - set BulletType
  • setExplosion(double explosion) - set explosion __________
  • GunHitEntityEvent - This is called when a bullet, grenade, or RPG hits an entity. This event is cancellable. GunHitEntityEvent's methods:
  • getEntity() - returns Entity (The one it hit)
  • getGun() - returns Gun
  • getVelocity() - returns vector
  • getShooter() - returns Player
  • getDamage() - returns double
  • getBulletType() - returns BulletType
  • getExplosion() - returns double
  • getBullet() - returns Entity
  • isCancelled() - returns if it is canceled
  • setCancelled(boolean cancel) - sets if it is canceled
  • setGun(Gun gun) - sets Gun
  • setVelocity(Vector velocity) - set velocity
  • setDamage(double Damage) - set damage
  • setBulletType(BulletType bullet) - set BulletType
  • setExplosion(double explosion) - set explosion

Donate


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    72152
  • Created
    Jan 8, 2014
  • Last Released File
    Jan 8, 2014
  • Total Downloads
    2,335
  • License

Categories

Members

Recent Files