Fixed offline players and no notification for the punished player

This commit is contained in:
NEMESIS13cz
2015-10-30 16:37:47 +01:00
parent 45a9b260d9
commit 4ed319f15d

View File

@@ -98,7 +98,7 @@ def command(sender, cmd, label, args):
msg(sender, "&e-&a There are no people mining obsidian")
return True
for slave in slaves:
msg(sender, "&e-&a %s: %s blocks" % (slave.get_uuid(), slave.get_blocks()))
msg(sender, "&e-&a %s: %s blocks" % (server.getOfflinePlayer(juuid(slave.get_uuid())).getName(), slave.get_blocks()))
return True
elif args[0] == "add":
player = server.getOfflinePlayer(str(args[1]))
@@ -106,6 +106,7 @@ def command(sender, cmd, label, args):
player.teleport(server.getWorld(punish_world).getSpawnLocation())
Slave(False, player, int(args[2]))
save_slaves()
msg(player, "&e-&a You have been punished, mine %s blocks of obsidian to get out!" % args[2])
msg(sender, "&e-&a Player %s has been added into punishments for %s blocks of obsidian" % (player.getName(), args[2]))
else:
msg(sender, "&cYou can only punish online players")