java.lang.NullPointerException
at com.dev.phantomEngine.task.AITask.run(AITask.java:29)
at com.l2jmobius.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
What can be null here?
code:
package com.dev.phantomEngine.task;
import java.util.List;
import com.dev.phantomEngine.PhantomPlayer;
import com.dev.phantomEngine.PhantomPlayerManager;
public class AITask implements Runnable
{
private final int _from;
private int _to;
public AITask(int from, int to)
{
_from = from;
_to = to;
}
@Override
public void run()
{
adjustPotentialIndexOutOfBounds();
List<PhantomPlayer> fakePlayers = PhantomPlayerManager.INSTANCE.getFakePlayers().subList(_from, _to);
try
{
// fakePlayers.stream().filter(x -> !x.getFakeAi().isBusyThinking()).forEach(x -> x.getFakeAi().thinkAndAct());
for (PhantomPlayer p : fakePlayers)
{
if (!p.getFakeAi().isBusyThinking()) <- Here->
{
p.getFakeAi().thinkAndAct(); <- Here->
}
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
private void adjustPotentialIndexOutOfBounds()
{
if (_to > PhantomPlayerManager.INSTANCE.getFakePlayersCount())
{
_to = PhantomPlayerManager.INSTANCE.getFakePlayersCount();
}
}
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hello everyone!
I have a problem with editing mobs. I took some Mobs from here without sound and added them,
they looked good !!! BUT BUT !
When I hit him it does generate the effect, but when he hits it it doesn't.
Is this effect controlled from Npcgrp.dat?
PD_ I add capture of the event / effect I mention.
I await your answers, thank you!
Question
vRouxy
What can be null here?
code:
print stack trace points to these lines
Edited by vRouxy5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.