mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-04 19:12:50 -04:00
Added a debug check for potential player error
This commit is contained in:
@@ -197,12 +197,16 @@ public class PlayerService implements INetworkDispatch {
|
||||
}, 0, 1000, TimeUnit.MILLISECONDS));
|
||||
|
||||
scheduleList.add(scheduler.scheduleAtFixedRate(() -> {
|
||||
long[] ids = creature.getAwareObjects().stream().mapToLong(SWGObject::getObjectID).toArray();
|
||||
for(int i = 0; i < ids.length; i++) {
|
||||
for(int j = 0; j < ids.length; j++) {
|
||||
if(ids[i] == ids[j] && i != j)
|
||||
System.err.println("Detected duplicate ids, Template " + core.objectService.getObject(ids[i]).getTemplate());
|
||||
try {
|
||||
long[] ids = creature.getAwareObjects().stream().mapToLong(SWGObject::getObjectID).toArray();
|
||||
for(int i = 0; i < ids.length; i++) {
|
||||
for(int j = 0; j < ids.length; j++) {
|
||||
if(ids[i] == ids[j] && i != j)
|
||||
System.err.println("Detected duplicate ids, Template " + core.objectService.getObject(ids[i]).getTemplate());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}, 0, 5000, TimeUnit.MILLISECONDS));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user