fix colors, highlight word, create sound

This commit is contained in:
jomo
2014-06-21 00:52:16 +02:00
parent 3e27b2691b
commit c150fae053
3 changed files with 31 additions and 14 deletions

View File

@@ -31,6 +31,9 @@ def broadcast(perm, text):
def colorify(text):
return sub("&(?=[?\\da-fk-or])", u"\u00A7", "%s" % text)
def stripcolors(text):
return sub(u"\u00A7[\\da-fk-or]", "", "%s" % text)
def safetp(player, world, x, y, z, yaw = 0, pitch = 0):
tpblock = Location(world, x, y, z).getBlock()
if (tpblock.isEmpty() and tpblock.getRelative(bblock.BlockFace.UP).isEmpty()) or y > 255: