Fix npcs script (#266)

* fix the npcs

* add java8 compability

* .
This commit is contained in:
asafgb
2018-10-27 05:59:19 +03:00
committed by Ronan Lana
parent 589492572a
commit ba303432ff
2 changed files with 13 additions and 3 deletions

View File

@@ -987,9 +987,14 @@ public class EventInstanceManager {
}
private List<Integer> convertToIntegerArray(List<Double> list) {
List<Integer> intList = new ArrayList<>();
List<Integer> intList;
if(ServerConstants.JAVA_8)
intList=new ArrayList<Integer> (new ArrayList(java.util.Arrays.asList(list.toArray())));
else
{
intList = new ArrayList<>();
for(Double d: list) intList.add(d.intValue());
}
return intList;
}