mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Added support for localising command descriptions
This commit is contained in:
1 parent
2f167ff612
commit
5aef844173
19 files changed
+173
-50
No files matched your search
@@ -8,10 +8,7 @@ import me.william278.huskhomes2.integrations.VanishChecker;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class TeleportRequestHandler {
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public class TimedTeleport {
|
||||
sendWarmupMessage(player, "teleporting_action_bar_cancelled");
|
||||
return;
|
||||
}
|
||||
if (hasDamagedPlayers(executablePlayer)) {
|
||||
if (hasDealtDamage(executablePlayer)) {
|
||||
cancel();
|
||||
executablePlayer.playSound(executablePlayer.getLocation(), HuskHomes.getSettings().getTeleportCancelledSound(), 1, 1);
|
||||
MessageManager.sendMessage(player, "teleporting_cancelled_pvp");
|
||||
@@ -202,8 +202,8 @@ public class TimedTeleport {
|
||||
return totalDiff > movementThreshold;
|
||||
}
|
||||
|
||||
// This returns if the player has damaged other players
|
||||
public boolean hasDamagedPlayers(Player p) {
|
||||
// This returns if the player has dealt damage
|
||||
public boolean hasDealtDamage(Player p) {
|
||||
final int damageDealt = p.getStatistic(Statistic.DAMAGE_DEALT);
|
||||
return damageDealt > initialDamageDealt;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user