cleanup: use Java-style array declaration

This commit is contained in:
P0nk
2021-04-08 07:17:03 +02:00
parent ed5a444753
commit 5e3b346053
41 changed files with 163 additions and 182 deletions

View File

@@ -48,7 +48,7 @@ public abstract class Command {
this.rank = rank;
}
protected String joinStringFrom(String arr[], int start) {
protected String joinStringFrom(String[] arr, int start) {
StringBuilder builder = new StringBuilder();
for (int i = start; i < arr.length; i++) {
builder.append(arr[i]);

View File

@@ -42,8 +42,8 @@ public class SeedCommand extends Command {
player.yellowMessage("This command can only be used in HPQ.");
return;
}
Point pos[] = {new Point(7, -207), new Point(179, -447), new Point(-3, -687), new Point(-357, -687), new Point(-538, -447), new Point(-359, -207)};
int seed[] = {4001097, 4001096, 4001095, 4001100, 4001099, 4001098};
Point[] pos = {new Point(7, -207), new Point(179, -447), new Point(-3, -687), new Point(-357, -687), new Point(-538, -447), new Point(-359, -207)};
int[] seed = {4001097, 4001096, 4001095, 4001100, 4001099, 4001098};
for (int i = 0; i < pos.length; i++) {
Item item = new Item(seed[i], (byte) 0, (short) 1);
player.getMap().spawnItemDrop(player, player, item, pos[i], false, true);

View File

@@ -40,7 +40,7 @@ import java.util.Arrays;
import java.util.List;
public class DebugCommand extends Command {
private final static String debugTypes[] = {"monster", "packet", "portal", "spawnpoint", "pos", "map", "mobsp", "event", "areas", "reactors", "servercoupons", "playercoupons", "timer", "marriage", "buff", ""};
private final static String[] debugTypes = {"monster", "packet", "portal", "spawnpoint", "pos", "map", "mobsp", "event", "areas", "reactors", "servercoupons", "playercoupons", "timer", "marriage", "buff", ""};
{
setDescription("Show a debug message.");