Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. words = 0
  2. for wordcount in textfile.readlines().split(":"):
  3. if wordcount == event.getPlayer().getName():
  4. words += 1
  5.  
  6. b2:PlayerName:Location{world=CraftWorld{name=world},x=224.23016231506807,y=71.0,z=190.2291303186236,pitch=31.349741,yaw=-333.30002}
  7.  
  8. words = 0
  9. for wordcount in textfile.read().split(":"):
  10. if wordcount == event.getPlayer().getName():
  11. words += 1
  12.  
  13. words = 0
  14. for line in textfile.readlines():
  15. # I assume that player name position is fixed
  16. word = line.split(':')[1]
  17. if word == event.getPlayer().getName():
  18. words += 1
  19.  
  20. from collections import Counter
  21.  
  22. counter = Counter([line.split(':') for line in textfile.readlines()])
  23.  
  24. counter[event.getPlayer().getName()]
  25.  
  26. words = textfile.read().count('PlayerName')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement