summaryrefslogtreecommitdiffstats
path: root/EssentialsiConomyBridge5/src/com/iConomy/banks.java
blob: 85ffabd80885ca0465d7849ef1fdf8b8ea4d0199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

package com.iConomy;

import com.earth2me.essentials.api.Economy;



public class banks
{
	
	
	public int count(String name){
		int count=0;
		int breaker = 0;
		for (int ctr = 1; breaker != 1; ctr++)
		{
			if (ctr == 1)
			{
				if (Economy.accountExist(name + "-bank"))
				{
					count = count + 1;
				}
				else
				{
					breaker = 1;
				}
			}
			if (Economy.accountExist(name + "-bank" + Integer.toString(ctr)) && ctr != 1)
			{
				count = count + 1;
			}
			else
			{
				breaker = 1;
			}
		}
					
		return count;	
	}


}