Minecraft ParticleProjectileApi mod 2026 download
logo
minecraft mod ParticleProjectileApi

ParticleProjectileApi

Game Version: 1.12
Total Downloads: 766
Updated: Jan 17, 2018
Created: Oct 22, 2017
Download ParticleProjectileApiDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
ParticleProjectileApi 0.1.0 (MC 1.12.2) release 11.12 KB Jan 17, 2018 1.12 209 download ParticleProjectileApi ParticleProjectileApi 0.1.0 (MC 1.12.2) releaseDownload
ParticleProjectileApi 0.0.9 (MC 1.12.2) release 11.08 KB Dec 28, 2017 1.12 70 download ParticleProjectileApi ParticleProjectileApi 0.0.9 (MC 1.12.2) releaseDownload
ParticleProjectileApi 0.0.8 (Mc 1.12.2) release 11.13 KB Dec 28, 2017 1.12 37 download ParticleProjectileApi ParticleProjectileApi 0.0.8 (Mc 1.12.2) releaseDownload
ParticleProjectileApi 0.0.7 (Mc 1.12.2) release 11.01 KB Dec 21, 2017 1.12 46 download ParticleProjectileApi ParticleProjectileApi 0.0.7 (Mc 1.12.2) releaseDownload
ParticleProjectileApi 0.0.6 (MC 1.12.2) release 11.01 KB Nov 13, 2017 1.12 86 download ParticleProjectileApi ParticleProjectileApi 0.0.6 (MC 1.12.2) releaseDownload
ParticleProjectileApi 0.0.5 (MC 1.12.2) beta 11.06 KB Nov 8, 2017 1.12 50 download ParticleProjectileApi ParticleProjectileApi 0.0.5 (MC 1.12.2) betaDownload
ParticleProjectileApi 0.0.4 (MC 1.12.2) beta 10.67 KB Nov 5, 2017 1.12 56 download ParticleProjectileApi ParticleProjectileApi 0.0.4 (MC 1.12.2) betaDownload
ParticleProjectileApi 0.0.3 (MC 1.12.2) beta 10.61 KB Oct 30, 2017 1.12 55 download ParticleProjectileApi ParticleProjectileApi 0.0.3 (MC 1.12.2) betaDownload
ParticleProjectileApi 0.0.2 (MC 1.12.2) beta 8.38 KB Oct 23, 2017 1.12 87 download ParticleProjectileApi ParticleProjectileApi 0.0.2 (MC 1.12.2) betaDownload
ParticleProjectileApi 0.0.1 (MC 1.12.2) beta 10.09 KB Oct 23, 2017 1.12 67 download ParticleProjectileApi ParticleProjectileApi 0.0.1 (MC 1.12.2) betaDownload

Screenshots

Description

Share this:

 Description


This API is designed to allow plugin developers to easily add customized particle projectiles, hence the name. ParticleProjectileApi comes with its own event classes giving the developer a way to cancel an effect when a particle hits, this is quite useful in say mini-games to prevent friendly-fire. It is completely possible to create multiple projectile classes and is encouraged too. When extending the ParticleProjectile class, the developer will be met with five methods: OnHit, OnHitBlock, OnHitEntity, OnPenetrateBlock, OnPenetrateEntity, and OnMove. These methods allow for adding code to run when a projectile hits, passes through something, or moves.

 

Features


  • method to launch particles (No packets used)
  • Custom events that can be canceled
  • Create multiple projectile classes for different effects
  • More to come!

Usage


MyProjectile.class

package com.aim.coltonjgriswold.projectiles;

import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Damageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

import com.aim.coltonjgriswold.api.ParticleProjectile;

public class MyProjectile extends ParticleProjectile {

    public MyProjectile() {
	super(Particle.REDSTONE, 0.1, 7.5, 20.0, 128.0);<br />        ignoreMaterial(Material.STATIONARY_WATER);<br />        setColor(ParticleColor.fromRGB(255, 0, 0);
	//Initialize a projectile with a color of red, a hitbox of 0.1 cubed, Mass of 7.5 grams, speed of 20.0 meters/second, max distance of 128 meters, and ignore STATIONARY_WATER.
    }

    @Override
    public void OnHit(LivingEntity who, Location start, Location end) {
	//Do something when reach max distance
    }

    @Override
    public void OnHitBlock(LivingEntity who, Location start, Location end, Block what) {
	//Do something when hit block
    }

    @Override
    public void OnHitEntity(LivingEntity who, Location start, Location end, Entity what) {
	//Do something when hit entity
    }

    @Override
    public void OnPenetrateBlock(LivingEntity  who, Location where, Block what) {
	//Do something when passing through a block
    }

    @Override
    public void OnPenetrateEntity(LivingEntity  who, Location where, Entity what) {
	//Do something when passing through an entity
    }
        public void OnMove(Location previous, Location current, double step) {
                //Do something when the the particle moves
        }
}

MyPlugin.class

package com.aim.coltonjgriswold;

import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;

import com.aim.coltonjgriswold.api.utilities.ParticleColor;
import com.aim.coltonjgriswold.projectiles.MyProjectile;

public class MyPlugin extends JavaPlugin implements Listener {

    MyProjectile projectile;
    
    public void onEnable() {
	getServer().getPluginManager().registerEvents(this, this);
	projectile = new MyProjectile();
    }

    public void onDisable() {

    }
    
    @EventHandler
    public void oninteract(PlayerInteractEvent event) {
	Material item = event.getPlayer().getInventory().getItemInMainHand().getType();
	if (item == Material.STICK) {
	    //launch MyProjectile with physics turned on
	    projectile.launch(event.getPlayer(), true);
	}
    }
}

Example Plugin Utilizing ParticleProjectileApi & Javadocs


Javadocs: ParticleProjectileApi

Example plugin:

 

Comments

Add a comment