mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-08-17 09:05:47 +00:00
Introduce error message for a failed teleport (#46)
Co-authored-by: RodneyMKay <herr-fant@web.de>
This commit is contained in:
parent
dbdf7d6a60
commit
9ef95e5d78
@ -60,6 +60,7 @@ public class RTPPlayer {
|
||||
|
||||
// Compressed code for MaxAttempts being met
|
||||
private void metMax(CommandSender sendi, Player p) {
|
||||
settings.teleport.failed(p);
|
||||
if (p == sendi)
|
||||
getPl().getText().getFailedNotSafe(sendi, settings.maxAttempts);
|
||||
else
|
||||
|
@ -2,7 +2,6 @@ package me.SuperRonanCraft.BetterRTP.player.rtp;
|
||||
|
||||
import io.papermc.lib.PaperLib;
|
||||
import me.SuperRonanCraft.BetterRTP.Main;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -10,7 +9,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@ -136,4 +134,8 @@ public class RTPTeleport {
|
||||
private Main getPl() {
|
||||
return Main.getInstance();
|
||||
}
|
||||
|
||||
public void failed(Player p) {
|
||||
eTitles.showTitle(RTPTitles.RTP_TITLE_TYPE.FAILED, p, p.getLocation(), 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class RTPTitles {
|
||||
}
|
||||
|
||||
enum RTP_TITLE_TYPE {
|
||||
NODELAY("NoDelay"), TELEPORT("Teleport"), DELAY("Delay"), CANCEL("Cancelled"), LOADING("Loading");
|
||||
NODELAY("NoDelay"), TELEPORT("Teleport"), DELAY("Delay"), CANCEL("Cancelled"), LOADING("Loading"), FAILED("Failed");
|
||||
String path;
|
||||
RTP_TITLE_TYPE(String path) {
|
||||
this.path = path;
|
||||
|
Loading…
x
Reference in New Issue
Block a user