summaryrefslogtreecommitdiffstats
path: root/EssentialsiConomyBridge5/src/com/iConomy/banks.java
blob: 51c1a27b142e572bc55bb69e55f74dffafc254f9 (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
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;
	}
}