I need help! UpdateSigns

LucGamesHD

Developer
Hey i have a problem...
I keep getting errors from the level in the console :/



Java:
package de.lucgameshd.gungame.scheduler;


import cn.nukkit.blockentity.BlockEntitySign;
import cn.nukkit.scheduler.PluginTask;
import de.lucgameshd.gungame.GunGame;

public class SignUpdate extends PluginTask<GunGame> {

	GunGame pl;

	public SignUpdate(GunGame owner) {
		super(owner);
		this.owner = pl;

	}

	@Override
	public void onRun(int arg0) {
		for(int i = 0; i < this.pl.getServer().getDefaultLevel().getBlockEntities().size(); i++){
			BlockEntitySign tile = (BlockEntitySign) this.pl.getServer().getDefaultLevel().getBlockEntities().get(i);
			if(tile instanceof BlockEntitySign){
				if(tile.getText()[0].equalsIgnoreCase("Test")){
					tile.setText("Hallo", "Line2");
				}
			}
		}
		
	}
	

}
 

LucGamesHD

Developer
Yes here

18:21:02 [CRITICAL] Could not execute taskHandler Unknown: null
18:21:02 [ALERT] java.lang.NullPointerException
at de.lucgameshd.gungame.scheduler.SignUpdate.onRun(SignUpdate.java:20)
at cn.nukkit.scheduler.ServerScheduler.lambda$addTask$46(ServerScheduler.java:147)
at cn.nukkit.scheduler.TaskHandler.run(TaskHandler.java:93)
at cn.nukkit.scheduler.ServerScheduler.mainThreadHeartbeat(ServerScheduler.java:185)
at cn.nukkit.Server.tick(Server.java:951)
at cn.nukkit.Server.tickProcessor(Server.java:756)
at cn.nukkit.Server.start(Server.java:736)
at cn.nukkit.Server.<init>(Server.java:440)
at cn.nukkit.Nukkit.main(Nukkit.java:65)
 
Top