1

"Internal Error..." Help

pieterx12's Avatar pieterx1211/12/15 12:06 pm
1 emeralds 206
Hey Guys,
I wanna to try to make a teleport command but everytime I wanna make one this message appear "An Internal Error Occured While Performing this.) This is the error message that the console shows:
org.bukkit.command.CommandException: Unhandled exception executing command 'goodbye' in plugin PixelDice v1.0
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-5f38d38-18fbb24]
at me.incomprehendable.dev.pwp.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:98) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot.jar:git-Spigot-5f38
d38-18fbb24]
at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot.jar:git-Spigo
t-5f38d38-18fbb24]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot.jar:git-Spigot-5f38d38-18f
bb24]
at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-5f38d38-18fb
b24]
at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-5f38d38-18fbb
24]
at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-5f38d38-18fbb2
4]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_65]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_65]
at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-5f38d38-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot.jar:git-Spigot-5f38d38-18fbb
24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-5f38d38-18fbb
24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-5f38d38-18fbb
24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-5f38d38-18f
bb24]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_65]
Caused by: java.lang.NullPointerException
at org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer.teleport(CraftPlayer.java:460) ~[spigot.jar:git-Spigot-5f38
d38-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity.teleport(CraftEntity.java:226) ~[spigot.jar:git-Spigot-5f38
d38-18fbb24]
at com.pixeldice.main.commands.Goodbye.onCommand(Goodbye.java:20) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-5f38d38-18fbb24]
... 15 more

And this is my code:
package com.pixeldice.main.commands;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class Goodbye implements CommandExecutor{

@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if(label.equalsIgnoreCase("goodbye")){
Player p = (Player)sender;

World cave = Bukkit.getServer().getWorld("world2");
Bukkit.getServer().getWorlds().add(cave);
p.teleport(new Location(cave, 1, 9, 1));
p.sendMessage("Goodbye.");
return true;
}

return false;
}




}

Can someone please help me - tnx
Posted by pieterx12's Avatar
pieterx12
Level 8 : Apprentice Miner
1

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome