diff options
author | mbax <github@phozop.net> | 2012-10-30 01:58:05 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-10-30 02:11:14 -0400 |
commit | 9907150d92934a98fdda78709b2dd9f2fafbb7b8 (patch) | |
tree | ce53cf326969d28084a2378c6f6815cfadb59d56 /src | |
parent | 94effa3f0e91b996e38f92946216bfb6b4050a24 (diff) | |
download | bukkit-9907150d92934a98fdda78709b2dd9f2fafbb7b8.tar bukkit-9907150d92934a98fdda78709b2dd9f2fafbb7b8.tar.gz bukkit-9907150d92934a98fdda78709b2dd9f2fafbb7b8.tar.lz bukkit-9907150d92934a98fdda78709b2dd9f2fafbb7b8.tar.xz bukkit-9907150d92934a98fdda78709b2dd9f2fafbb7b8.zip |
[Bleeding] Check for player validity in spawnpoint command. Fixes BUKKIT-2742
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java b/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java index 0f2abfa6..50692157 100644 --- a/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java +++ b/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java @@ -36,6 +36,10 @@ public class SpawnpointCommand extends VanillaCommand { } } else { player = Bukkit.getPlayerExact(args[0]); + if (player == null) { + sender.sendMessage("Can't find user " + args[0]); + return true; + } } World world = player.getWorld(); |