Hello everybody! Me & the server i'm in are currently working on a drugsserver. We already got a plugin for using drugs, but we are looking for something usefull the cops can use. Something like Crowd Control weapons? The weapons we are thinking of are : Flashbangs : A snowball that will give players in a 5 block radius blindness & slowness Teargas : A throwable Ghast tear that wil make players in a certain range puke out all of their items Stunguns : This will turn a certain item (A golden tool or something?) into a small weapon that uses 1 sulphur for every shot, and will lock the hitted player in place for a configurable amount of seconds? We weren't able to find any plugin like this, so that's why i'm requesting one here. Cheers, PureLiquid
Sounds like a cool idea. I'll try and make it. Probably wont go far as I'm still very new at plugin developing.
Freakin' awesome idea! I could do this, but I have been busy with school and stuff. I already have some of the requested code that I will need to change a bit to do what you want, but I will see what I can do!
I could do this: Teargas : A throwable Ghast tear that wil make players in a certain range puke out all of their items Code:JAVA package me.ceramictitan.test; import java.util.HashSet;import java.util.Set; import org.bukkit.Bukkit;import org.bukkit.EntityEffect;import org.bukkit.Material;import org.bukkit.entity.Entity;import org.bukkit.entity.Item;import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.block.Action;import org.bukkit.event.player.PlayerInteractEvent;import org.bukkit.event.player.PlayerPickupItemEvent;import org.bukkit.inventory.ItemStack;import org.bukkit.plugin.PluginManager;import org.bukkit.plugin.java.JavaPlugin;import org.bukkit.potion.PotionEffect;import org.bukkit.potion.PotionEffectType; public class test extends JavaPlugin implements Listener{ public Set<Entity> items = new HashSet<Entity>(); public void onEnable(){ PluginManager pm = getServer().getPluginManager(); pm.registerEvents(this, this); } @EventHandler public void onInteract(PlayerInteractEvent event) { if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK){ Player player = event.getPlayer(); if (player.getItemInHand().getType() == Material.GHAST_TEAR) { //Frag Grenades final Item grenade = event.getPlayer().getWorld().dropItem(player.getEyeLocation(), new ItemStack(Material.GHAST_TEAR)); grenade.setVelocity(event.getPlayer().getEyeLocation().getDirection()); player.getInventory().removeItem(grenade.getItemStack()); Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() { @Override public void run() { grenade.setLastDamageCause(null); for(Player ppl : Bukkit.getServer().getOnlinePlayers()) if(ppl.getLocation().distance(grenade.getLocation())<=5){ for(ItemStack i : ppl.getInventory().getContents()){ if(i != null){ ppl.getWorld().dropItemNaturally(ppl.getLocation(), i); ppl.getInventory().remove(i); ppl.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 10*20, 4)); items.add(grenade); } } } grenade.playEffect(EntityEffect.WOLF_SMOKE); grenade.remove(); items.remove(grenade); } }, 60L); event.setCancelled(true); } }} @EventHandler public void onItemPickup(PlayerPickupItemEvent event){ if(items.contains(Material.GHAST_TEAR)){ event.setCancelled(true); } }}
Wow, great that all of you are interested in a plugin like this! I also thought of another option if that's not to hard to code in, particles? Like smoke particles on impact of the flashbang and teargas?
PureLiquid I was working on this, I made like 2 of the things you requested (flashbang and teargas). I didn't finish it though, I might work on it later.