Advertisement
morganm

Untitled

Sep 6th, 2011
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. List<String> configPointKeys = bukkitConfig.getKeys("offensePointMap");
  2.  
  3. if( configPointKeys == null || configPointKeys.isEmpty() )
  4. return pointKeyMap;
  5.  
  6. for(Iterator<String> i = configPointKeys.iterator(); i.hasNext();) {
  7. Object o = i.next();
  8.  
  9. int keyInt = -1;
  10.  
  11. // shouldn't be possible since Configuration.getKeys() is supposed to return List<String>,
  12. // but it turns out it's can/does return Integers in the list. Oops.
  13. if( o instanceof Integer ) {
  14. System.out.println("Found Integer where String was expected");
  15. keyInt = ((Integer) o).intValue();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement