first commit via git

This commit is contained in:
jomo
2014-05-16 23:04:40 +02:00
commit b7de342537
15 changed files with 972 additions and 0 deletions

15
skullclick.py Normal file
View File

@@ -0,0 +1,15 @@
import org.bukkit as bukkit
from helpers import *
@hook.event("player.PlayerInteractEvent", "monitor")
def onInteract(event):
if (str(event.getAction()) == "RIGHT_CLICK_BLOCK"):
sender = event.getPlayer()
block = event.getClickedBlock().getState()
if (isinstance(block, bukkit.block.Skull) and not event.isCancelled()):
owner = block.getOwner()
if (owner):
msg(sender, "&eThat's %s." % owner)
else:
msg(sender, "&cThis skull has no name (Steve)")
event.setCancelled(True)