Help in my code

Discussion in 'Plugin Development' started by ratg97, Jun 8, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ratg97

    Hi i need to put commands and permissions for trails (particle effects) but... i dont know how i can
    The issue is that i am creating a dragon ball bukkit plugin and when you write /saiyan and have permisssions you get a lot of red particles over you.

    Main
    Code:
    package me.Weaver.Effects;
     
    import org.bukkit.Bukkit;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Main extends JavaPlugin implements Listener {
       
        public void onEnable (){
              Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
                  public void run() {
                          for (Player p : Bukkit.getServer().getOnlinePlayers()) {
                                  ParticleEffect.BUBBLE.display(p.getLocation().add(0, 2, 0), 15, 0, 0, 0, 2, 10);
                          }
                         
                  }
          }, 0, 20);
        }
    }
    

    ParticleEffect
    ReflectionHandler

    I use Particle lib 1.7
     
  2. You need to know how commands and permissions work? The most basic features of bukkit?
    well, for permissions it's:
    boolean#player.hasPermission(string)

    and for the commands,
    http://wiki.bukkit.org/Plugin_Tutorial
    somewhere here.

    Also, wrong forum.
     
  3. Offline

    ratg97

    but with this code i cant do this help me
     
  4. It's easy, I've told you everything you need to know. But if you still can't work it out, you should learn java first.
     
  5. Offline

    ratg97

    BlockCat i know a lot but public void run() {} is not Public Boolean

    If you can help me put the code
     
  6. Offline

    Lolmewn

    ratg97 Have you tried reading the tutorial?
     
  7. Offline

    ratg97

    yes but i dont know where put
    Code:
    if (cmd.getName().equalsIgnoreCase("basic")) {
            return true;
        }
        return false; 
     
  8. In the onCommand section.
     
  9. Offline

    ratg97

    can you put full code? i am very confuse
     
  10. Offline

    Iroh

    Moved to plugin dev.
     
  11. Offline

    MCMatters

    ratg97 learn bukkit API and java
     
  12. Offline

    ratg97

Thread Status:
Not open for further replies.

Share This Page