mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
fix: ensure TeleportationException is sent
This commit is contained in:
1 file changed
+5
-1
@@ -23,6 +23,7 @@ import lombok.Getter;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.user.CommandUser;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TeleportationException extends IllegalStateException {
|
||||
|
||||
@@ -36,7 +37,10 @@ public class TeleportationException extends IllegalStateException {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public void displayMessage(@NotNull CommandUser user, @NotNull String... args) {
|
||||
public void displayMessage(@Nullable CommandUser user, @NotNull String... args) {
|
||||
if (user == null) {
|
||||
user = plugin.getConsole();
|
||||
}
|
||||
switch (type) {
|
||||
case TELEPORTER_NOT_FOUND -> plugin.getLocales()
|
||||
.getLocale("error_player_not_found", args)
|
||||
|
||||
Reference in new issue
Block a user