Fixed /tp player1 player2
This commit is contained in:
@@ -19,6 +19,8 @@ import com.redstoner.misc.Main;
|
||||
import com.redstoner.modules.Module;
|
||||
import com.redstoner.modules.datamanager.DataManager;
|
||||
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.nemez.chatapi.ChatAPI;
|
||||
|
||||
@Commands(CommandHolderType.File)
|
||||
@@ -93,6 +95,6 @@ public class Survival implements Module, Listener {
|
||||
|
||||
public void notifyPlayers(List<Player> players, String msg) {
|
||||
for (Player p : players)
|
||||
ChatAPI.sendActionBar(p, "&0[&2Sleep&0] " + msg);
|
||||
p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(ChatAPI.colorify(null, "&0[&2Sleep&0] " + msg)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,14 +89,14 @@ public class Teleport implements Module, Listener
|
||||
}
|
||||
|
||||
Player p1 = Bukkit.getPlayer(player);
|
||||
Player p2 = Bukkit.getPlayer(player);
|
||||
Player p2 = Bukkit.getPlayer(player2);
|
||||
|
||||
if (p1 == null)
|
||||
playerDoesNotExistError(sender, player);
|
||||
else if (p2 == null)
|
||||
playerDoesNotExistError(sender, player2);
|
||||
else if (p1.getName().equals(p2.getName()))
|
||||
cannotTpToYourself(sender);
|
||||
getLogger().message(sender, true, "You can't teleport a player to themselves.");
|
||||
else {
|
||||
p1.teleport(p2, TeleportCause.COMMAND);
|
||||
getLogger().message(sender, "&e" +p1.getDisplayName() + "&7 has been teleported to &e" +
|
||||
|
||||
Reference in New Issue
Block a user