Skip to content

Instantly share code, notes, and snippets.

@johndalton
Created December 1, 2011 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johndalton/1416106 to your computer and use it in GitHub Desktop.
Save johndalton/1416106 to your computer and use it in GitHub Desktop.
Bang! A simple Purugin plugin for Minecraft…
class BangPlugin
include Purugin::Plugin
description 'Bang', 0.1
def on_enable
public_command('bang', 'Cause explosion at target coords.', '/bang') do |me, *args|
me.world.createExplosion(me.target_block.location, 2, true)
end
public_command('flash', 'Cause lightning strike at target coords.', '/flash') do |me, *args|
me.world.strikeLightning(me.target_block.location)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment