How to add fake lightning?

Discussion in 'Plugin Development' started by Sean0402, Jul 29, 2014.

Thread Status:
Not open for further replies.
  1. Hello how do I make the player have fake lightning to their location? I have it for every 2minutes

    Code:java
    1. public void onEnable(){
    2. Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
    3. public void run(){
    4.  
    5. }
    6. }, 20*120, 20*120);
    7. }
    8.  
     
  2. Offline

    Chiller

    Sean0402

    So first you need a location then you can call this:

    Code:java
    1. location.getWorld().strikeLightningEffect(location);
     
  3. Chiller I done that. Now how to make it do no damage? Etc..

    Code:java
    1. public void onEnable(){
    2. Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
    3. public void run(){
    4. Location location = Bukkit.getPlayer();
    5. location.getWorld().strikeLightningEffect(location);
    6. }
    7. }, 20*120, 20*120);
    8. }
    9.  
    10.  
    11. }
    12.  
     
  4. Offline

    Chiller

    Sean0402 Have you tried it and does lightning strike?
     
  5. Offline

    Ozeir

    Sean0402 strikelightningeffect is just the effect without damage strikelightning does damage and effect
     
Thread Status:
Not open for further replies.

Share This Page