Guest User

Untitled

a guest
Aug 8th, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. long currentTime = System.currentTimeMillis();
  2. public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
  3. if (player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(MyModItems.deanChestplate))
  4. {
  5. player.capabilities.allowFlying=true;
  6. if(System.currentTimeMillis() - currentTime > 9000)
  7. {
  8. if(player.getCurrentArmor(2) == null || !player.getCurrentArmor(2).getItem().equals(MyModItems.deanChestplate))
  9. {
  10. player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 40, 1, true));
  11. }
  12. }
  13. }
  14.  
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment