gimme register method.
|
|
Hello, so whenever i do ::npc it spawns 2 of the npc's that I am trying to spawn. I only want one to spawn.
if (command[0].equals("npc")) {
int id = Integer.parseInt(command[1]);
NPC npc = new NPC(id, new Position(player.getPosition().getX(), player.getPosition().getY(), player.getPosition().getZ()));
World.register(npc);
}
If you need any more of my code let me know!
There ya gopublic static void register(Entity entity) {
EntityHandler.register(entity);
}
Most likely the command was added twice.
I dont have it added twice.
fixed it, thanks everyone who helped!

Wrecked is right, the command is being called twice. If not then the actual method is somehow, shouldn't be hard to backtrack it using an IDE like Eclipse.
| « Int calculation | Anyone can help me with add rank iron man » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |