VanishAPI

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

Did you ever wanted to make a vanish plugin, but without succes?
Than is VanishAPI the solution for you!

Why VanishAPI

Why you should use VanishAPI? Because it's quick and easy, made for beginners and professionals. 100% N00B proof!

For Server Owners

If you are a server owner, you can just download the newest VanishAPI file, and Drag & Drop it in your plugins folder!

For Developers

If you are a developer, you have to download VanishAPI and put it in your library. If you want to see how to use it, look at the example below
Warning: Do not forgot to add a depend or softdepend tag in your plugin.yml!

How to use VanishAPI

Example

package me.bramhaag.Testing;

import me.bramhaag.VanishAPI.VanishAPI;

import org.bukkit.Bukkit;
import org.bukkit.Effect;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener
{
	public void onEnable()
	{
		Bukkit.getServer().getPluginManager().registerEvents(this, this);
	}

	public void onDisable()
	{

	}

	public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
	{
		Player p = (Player) sender;

		if (cmd.getName().equalsIgnoreCase("hide"))
		{
			VanishAPI.hide(p);
		}

		else if (cmd.getName().equalsIgnoreCase("hideall"))
		{
			VanishAPI.hideAll(p);
		}

		else if (cmd.getName().equalsIgnoreCase("unhideall"))
		{
			VanishAPI.unhideAll(p);
		}

		else if (cmd.getName().equalsIgnoreCase("unhide"))
		{
			VanishAPI.unhide(p);
		}
		return false;

	}

	@EventHandler
	public void popping(EntityDamageByEntityEvent e)
	{
		Entity attacker = e.getDamager();
		Entity entity = e.getEntity();

		if (((entity instanceof Player)) && ((attacker instanceof Player)))
		{
			Player popped = (Player)entity;
			Player popper = (Player)attacker;

			VanishAPI.popPlayer(popped, popper, 10, Effect.POTION_BREAK, Effect.SMOKE, Effect.GHAST_SHOOT, Effect.ZOMBIE_DESTROY_DOOR);
		}
	}
}

Methods

More methods are coming soon!

VanishAPI.hide(Player player)

player = Player to hide

Example :

VanishAPI.hide(p);

VanishAPI.hideAll(Player player)

player = Player for who all the players are vanished

Example :

VanishApi.hideAll(p);

VanishAPI.unhide(Player player)

player = Makes a hidden player visible again

Example :

VanishAPI.unhide(p);

VanishAPI.unhideAll(Player player)

player = Makes all the players for the player visible again Example :

VanishAPI.unhideAll(p);

VanishAPI.popPlayer(Player popped, Player popper, int delay, Effect effect1, Effect effect2, Effect effect3, Effect effect4)

popped = Popped Player

popper = The player

delay = The delay before the popped player is visible again (Set to 0 to disable delay)

effect1 = Set the first effect (Set it to null to disable effect1)

effect2 = Set the first effect (Set it to null to disable effect2)

effect3 = Set the first effect (Set it to null to disable effect3)

effect4 = Set the first effect (Set it to null to disable effect4)

Example :

VanishAPI.popPlayer(popped, popper, 10 * 20, Effect.POTION_BREAK, Effect.SMOKE, Effect.GHAST_SHOOT, null)

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    76049
  • Created
    Mar 12, 2014
  • Last Released File
    Never
  • Total Downloads
    384
  • License

Categories

Members

Recent Files