mirror of
https://e.coding.net/circlecloud/SimpleEssential.git
synced 2024-11-16 01:08:46 +00:00
fix tp tip display error...
This commit is contained in:
parent
1c529d697c
commit
502dee5b81
@ -55,8 +55,8 @@ public class TeleportControl {
|
|||||||
target = player;
|
target = player;
|
||||||
loc = ti.getTarget().getLocation();
|
loc = ti.getTarget().getLocation();
|
||||||
}
|
}
|
||||||
player.sendMessage(Language.getMessage("Teleport.accept"));
|
player.sendMessage(Language.getMessage("Teleport.accept", target.getDisplayName()));
|
||||||
target.sendMessage(Language.getMessage("Teleport.acceptfrom"));
|
target.sendMessage(Language.getMessage("Teleport.acceptfrom", player.getDisplayName()));
|
||||||
magicTeleport(target, loc, TpDelay);
|
magicTeleport(target, loc, TpDelay);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -103,8 +103,8 @@ public class TeleportControl {
|
|||||||
if (ti != null) {
|
if (ti != null) {
|
||||||
Player target = ti.getTarget();
|
Player target = ti.getTarget();
|
||||||
if (target.isOnline()) {
|
if (target.isOnline()) {
|
||||||
player.sendMessage(Language.getMessage("Teleport.deny"));
|
player.sendMessage(Language.getMessage("Teleport.deny", target.getDisplayName()));
|
||||||
target.sendMessage(Language.getMessage("Teleport.denyfrom"));
|
target.sendMessage(Language.getMessage("Teleport.denyfrom", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -136,7 +136,8 @@ public class TeleportControl {
|
|||||||
public void magicTeleport(final Player player, final Location loc, final int delay) {
|
public void magicTeleport(final Player player, final Location loc, final int delay) {
|
||||||
int petime = delay * 20 + 10;
|
int petime = delay * 20 + 10;
|
||||||
setLastloc(player, player.getLocation());
|
setLastloc(player, player.getLocation());
|
||||||
player.sendMessage(Language.getMessage("Teleport.tp", delay, loc.getWorld().getName(), loc.getBlockX(), loc.getBlockZ()));
|
player.sendMessage(Language.getMessage("Teleport.tp", delay, loc.getWorld().getName(),
|
||||||
|
loc.getBlockX(), loc.getBlockZ()));
|
||||||
List<PotionEffect> pe = new ArrayList<PotionEffect>();
|
List<PotionEffect> pe = new ArrayList<PotionEffect>();
|
||||||
pe.add(new PotionEffect(PotionEffectType.SLOW, petime, 255));
|
pe.add(new PotionEffect(PotionEffectType.SLOW, petime, 255));
|
||||||
pe.add(new PotionEffect(PotionEffectType.CONFUSION, petime, 255));
|
pe.add(new PotionEffect(PotionEffectType.CONFUSION, petime, 255));
|
||||||
@ -149,7 +150,8 @@ public class TeleportControl {
|
|||||||
public void run() {
|
public void run() {
|
||||||
while (System.currentTimeMillis() < timeoutmark) {
|
while (System.currentTimeMillis() < timeoutmark) {
|
||||||
if (player.isOnline()) {
|
if (player.isOnline()) {
|
||||||
EffectUtil.run(player.getLocation(), lrng, Effect.MOBSPAWNER_FLAMES, Effect.PORTAL);
|
EffectUtil.run(player.getLocation(), lrng, Effect.MOBSPAWNER_FLAMES,
|
||||||
|
Effect.PORTAL);
|
||||||
}
|
}
|
||||||
lrng++;
|
lrng++;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user