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.
Aos Brasileiros curiosos e Lisos, o link para baixar esta apenas por premium, custa 5$ por mes, para testar minha interface antiga e cheia de bugs kkkkk
Outra coisa, eu deletei o link do patch, entao nao vai funcionar mesmo que voces baixem kkkk
Se quiserem comprar ela de mim, atualizada e funcional para LUCERA, chamem no facebook ou na DM com o numero do whatsapp
Lineage 2 Interlude L2OFF
Server Based on H5 Files
Are you looking to start your own Lineage 2 server? This is your chance! I’m selling a 100% functional server based on Official L2OFF H5 files, adapted to the Interlude version.
Main Features:
Based on official L2OFF H5 files, perfectly configured for Interlude.
Includes the full source code, allowing you to fully customize the server to fit your needs.
Fully working events, such as:
TvT (Team vs. Team)
CTF (Capture the Flag)
Tons of custom content added, keeping the balance and original essence of the game.
Why choose this project?
The server is fully functional and optimized, ready to launch.
You can test the server before purchasing, with access to a GM character to explore all features.
Comes with everything you need to make your project a success, both technically and in terms of content.
Interested?
Feel free to contact me! If you need more information or would like to schedule a test, I’m happy to answer any questions.
Auto Create Accounts
Client Test Server: DOWNLOAD
Price: 600 usd
Source price: send pm.
Discord: Guytis#6760
Skype: gustavoorellano@hotmail.com
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.