Skip to content

Commit

Permalink
Updated: Use getRespawnLocation over getBedSpawnLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaneyXYZ committed Jul 31, 2024
1 parent ecb5620 commit 91d0628
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CmdCompass extends TabCommand {
public CmdCompass(final RoyalCommands instance, final String name) {
super(instance, name, true, new Short[]{CompletionType.CUSTOM.getShort(), CompletionType.ONLINE_PLAYER.getShort()});
}

@Override
protected List<String> customList(final CommandSender cs, final Command cmd, final String label, final String[] args, final String arg) {
return new ArrayList<>(Arrays.asList("reset", "here", "player", "location"));
Expand All @@ -46,7 +46,7 @@ public boolean runCommand(final CommandSender cs, final Command cmd, final Strin
cs.sendMessage(MessageColor.POSITIVE + "Your compass now points to your current location.");
return true;
} else if (command.equalsIgnoreCase("reset")) {
p.setCompassTarget((p.getBedSpawnLocation() != null) ? p.getBedSpawnLocation() : CmdSpawn.getWorldSpawn(p.getWorld()));
p.setCompassTarget((p.getRespawnLocation() != null) ? p.getRespawnLocation() : CmdSpawn.getWorldSpawn(p.getWorld()));
p.sendMessage(MessageColor.POSITIVE + "Reset your compass.");
return true;
} else {
Expand Down

0 comments on commit 91d0628

Please sign in to comment.