Created
February 10, 2013 10:23
-
-
Save nopresnik/4749119 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() { | |
@Override | |
public void run() { | |
checkForIron(); | |
} | |
}, 20L, 20L); | |
public void checkForIron() { | |
for (Player p : getServer().getOnlinePlayers()) { | |
if (ArmourAbilities.hasIron(p)) { //Checks if player is wearing full set of iron | |
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 40, 0)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment