fix giveart command when times about 200, account will crash

This commit is contained in:
DancingSnow 2022-05-03 16:41:00 +08:00 committed by Melledy
parent 29eedb5075
commit f6d5fb1945

View File

@ -56,6 +56,9 @@ public final class GiveArtifactCommand implements CommandHandler {
if ((arr = it.split(",")).length == 2) { if ((arr = it.split(",")).length == 2) {
it = arr[0]; it = arr[0];
n = Integer.parseInt(arr[1]); n = Integer.parseInt(arr[1]);
if (n > 200) {
n = 200;
}
} }
appendPropIdList.addAll(Collections.nCopies(n, Integer.parseInt(it))); appendPropIdList.addAll(Collections.nCopies(n, Integer.parseInt(it)));
}); });