Add additional teleport execution handling

This commit is contained in:
William committed 2023-03-24 01:20:33 +00:00
1 parent 9c6ed329d5
commit 88f34ac133
8 files changed
+87 -40

No files matched your search

@@ -65,10 +65,10 @@ public class TpCommand extends Command implements TabProvider {
// Execute a teleport
private void execute(@NotNull CommandUser executor, @NotNull Teleportable teleportable, @NotNull Target target,
@NotNull String[] args) {
final TeleportBuilder builder = Teleport.builder(plugin)
.teleporter(teleportable)
.target(target);
try {
final TeleportBuilder builder = Teleport.builder(plugin)
.teleporter(teleportable)
.target(target);
if (executor instanceof OnlineUser user) {
builder.executor(user);
}