Added a radius to safe claim
This commit is contained in:
1 parent
b0e659e534
commit
3820b53d29
4 files changed
+66
-5
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package org.mcteam.factions.util;
|
||||
|
||||
public class MiscUtil {
|
||||
|
||||
// Inclusive range
|
||||
public static long[] range(long start, long end) {
|
||||
long[] values = new long[(int) Math.abs(end - start) + 1];
|
||||
|
||||
if (end < start) {
|
||||
long oldstart = start;
|
||||
start = end;
|
||||
end = oldstart;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (long i = start; i <= end; i++) {
|
||||
values[(int) (i - start)] = i;
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user