mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-20 05:21:21 +02:00
Handle jail teleport locations slightly better.
This commit is contained in:
@@ -122,7 +122,9 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
{
|
{
|
||||||
user.toggleVanished();
|
user.toggleVanished();
|
||||||
}
|
}
|
||||||
user.setLastLocation();
|
if (!user.isJailed()) {
|
||||||
|
user.setLastLocation();
|
||||||
|
}
|
||||||
user.updateActivity(false);
|
user.updateActivity(false);
|
||||||
user.dispose();
|
user.dispose();
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||||
|
|
||||||
|
|
||||||
public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||||
@@ -176,7 +177,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
|
|
||||||
public boolean canAfford(final double cost, final boolean permcheck)
|
public boolean canAfford(final double cost, final boolean permcheck)
|
||||||
{
|
{
|
||||||
if (cost <= 0.0) { return true; }
|
if (cost <= 0.0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
final double mon = getMoney();
|
final double mon = getMoney();
|
||||||
if (!permcheck || isAuthorized("essentials.eco.loan"))
|
if (!permcheck || isAuthorized("essentials.eco.loan"))
|
||||||
{
|
{
|
||||||
@@ -486,6 +490,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
getTeleport().respawn(null, TeleportCause.PLUGIN);
|
||||||
|
}
|
||||||
|
catch (Exception ex1)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -624,7 +635,6 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
{
|
{
|
||||||
enderSee = set;
|
enderSee = set;
|
||||||
}
|
}
|
||||||
|
|
||||||
private transient long teleportInvulnerabilityTimestamp = 0;
|
private transient long teleportInvulnerabilityTimestamp = 0;
|
||||||
|
|
||||||
public void enableInvulnerabilityAfterTeleport()
|
public void enableInvulnerabilityAfterTeleport()
|
||||||
|
Reference in New Issue
Block a user