mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Fixed bug where you could TP to dead players
This commit is contained in:
parent
5e12979f09
commit
ef3d76fb9f
@ -17,6 +17,8 @@ Version 1.3.04-dev
|
|||||||
= Fixed Green Terra & Super Breaker awarding 4x drops at high levels.
|
= Fixed Green Terra & Super Breaker awarding 4x drops at high levels.
|
||||||
= Fixed summoned ocelots never changing skins.
|
= Fixed summoned ocelots never changing skins.
|
||||||
= Fixed bug with Disarm not working
|
= Fixed bug with Disarm not working
|
||||||
|
= Fixed some API functions not being visible
|
||||||
|
= Fixed bug where /ptp worked on dead party members
|
||||||
! Changed MySQL to reload all player information on reconnection
|
! Changed MySQL to reload all player information on reconnection
|
||||||
! Changed event package structure - be sure to update these if you're using the API in your plugin
|
! Changed event package structure - be sure to update these if you're using the API in your plugin
|
||||||
|
|
||||||
|
@ -64,6 +64,11 @@ public class PtpCommand implements CommandExecutor {
|
|||||||
Player target = plugin.getServer().getPlayer(args[0]);
|
Player target = plugin.getServer().getPlayer(args[0]);
|
||||||
PlayerProfile PPt = Users.getProfile(target);
|
PlayerProfile PPt = Users.getProfile(target);
|
||||||
|
|
||||||
|
if (target.isDead()) {
|
||||||
|
player.sendMessage(ChatColor.RED + "You can't teleport to dead players."); //TODO: Needs more locale.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (PP.getParty().equals(PPt.getParty())) {
|
if (PP.getParty().equals(PPt.getParty())) {
|
||||||
McMMOPartyTeleportEvent event = new McMMOPartyTeleportEvent(player, target, PP.getParty());
|
McMMOPartyTeleportEvent event = new McMMOPartyTeleportEvent(player, target, PP.getParty());
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user