Plugin category: Fountain Suggested name: I ONLY NEED THE CODE TO PUT IT IN MY PLUGIN What I want: I need a plugin that spawns the water particle effect 2 blocks high on some special places... If someone wants to make it, pls make a little config where I can change/add the coordination points for the particles (not fallen water blocks with fallingsand!!), where they spawn... if theres a way to change the distance from where you can see them, make that to a high level.. I think something like 40-50 blocks would be nice. The plugin shouldn't have any commands and should be so little how possible.. Sorry for bad English I hope you have understood everything Also, skim-reading is much easier with paragraphs! Ideas for commands: No commands Ideas for permissions: no permissions If it can cause lags on client, make a permission that user without this permission cant see the water particles.. arraylist... When I'd like it by: On the weekend would be nice (Saturday or Sunday)
Deltateamsoldier I will start with the part that you only want code to put in the plugin. And if you know some coding then you can make this yourself.
timtower I cant do this because I never worked with locations.. I will try it and post the code in here and you can have a look whats wrong in it
Deltateamsoldier I believe what Tim is saying is he is making an API type thing so you can code it yourself. Deltateamsoldier http://jd.bukkit.org/rb/apidocs/org/bukkit/Location.html EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Code:java package de.jan.fountain; import org.bukkit.Bukkit;import org.bukkit.Effect;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.entity.Player;import org.bukkit.event.Listener;import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener { @SuppressWarnings("deprecation") public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { final Player p = (Player) sender; if(cmd.getName().equalsIgnoreCase("fountain")) if(args.length == 0) { p.sendMessage(""); p.sendMessage("§8§l> §aBenutze §2§l/fountain §acreate oder §2§l/fountain info"); p.sendMessage(""); } if(args[0].equalsIgnoreCase("info")) { p.sendMessage(""); p.sendMessage("§8§l> §2§lFountain - §aVersion §21.0"); p.sendMessage(""); } if(args[0].equalsIgnoreCase("create")) { Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { @Override public void run() { p.playEffect(p.getLocation(), Effect.MOBSPAWNER_FLAMES, 1); //I dont know how to use a particle effect } }, 0, 300*20); //How can I do it endless? p.sendMessage(""); p.sendMessage("Du hast einen Fountain erstellt"); p.sendMessage(""); } return false; }} timtower here is the example ^^
Deltateamsoldier You probably want to look at the configuration API, return statements, and try to start smaller. Try to get some java and bukkit knowledge. Your code will throw errors when not using arguments or just when running it from the console
Yes now theres the "if(sender instanceof Player) { " inside... In 2 month I will do a course on a Universits of applied science in Java ... sorry for my bad English ^^ - added return statements timtower Code:java package de.jan.fountain; import org.bukkit.Bukkit;import org.bukkit.Effect;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.entity.Player;import org.bukkit.event.Listener;import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener { @SuppressWarnings("deprecation") public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(sender instanceof Player) { final Player p = (Player) sender; if(cmd.getName().equalsIgnoreCase("fountain")) if(args.length == 0) { p.sendMessage(""); p.sendMessage("§8§l> §aUse §2§l/fountain info §afor all commands"); p.sendMessage(""); return true; } if(args[0].equalsIgnoreCase("info")) { p.sendMessage(""); p.sendMessage("§8§l> §2§lFountain - §aVersion §21.0"); p.sendMessage(""); return true; } if(args[0].equalsIgnoreCase("create")) { Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { @Override public void run() { p.playEffect(p.getLocation(), Effect.MOBSPAWNER_FLAMES, 1); //I don't know how to use a particle effect } }, 0, 300*20); //How can I do it endless? p.sendMessage(""); p.sendMessage("§8§l> §aNew fountain §ccreated"); p.sendMessage(""); return true; } if(args[0].equalsIgnoreCase("remove")) { Bukkit.getServer().getScheduler().cancelTask(0); //end of scheduler p.sendMessage("§8§l> §aFountain §cremoved"); return true; } else { if(!(sender instanceof Player)) { System.out.println("§cNur als Spieler ausführbar!"); } } } return false; }} EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Deltateamsoldier threads like this are supposed to be in the development forum and not in the request forum
Shmobi I made a request man! But timtower thinks that I should code that -.- Best support forum guys! EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Deltateamsoldier You are requesting plain code for something that isn't that hard to learn yourself if you put some effort in.
But how should I do that if I don't know much about Java or Bukkit and have the course in 2 month?! Someone has to explain but no one want because its to much "work" ^^
Deltateamsoldier I know plenty of people that self thought java, it takes time, don't rush things, don't try to make something when you don't know how.
Okay I think I will start learning it soon, because I have to do some stuff for school next weeks... Thanks for your answers timtower and bwfcwalshy
timtower I have one last question. I will do the particle effect with the particleffect library from DarkBladee12 I think its the famoust Particleeffect library.. But in this library are many effects I don't need... could you send me the part of the lib. with the code of the water particle?
Deltateamsoldier I won't strip a library, most libraries have more functionality that the user needs. Just ignore those features.
timtower and you don't think its more "work" for the server with the complete library? sry for bad English ^^