Skip to content

Instantly share code, notes, and snippets.

View jimmikaelkael's full-sized avatar

Michaël Jimenez jimmikaelkael

View GitHub Profile
World world = Bukkit.getWorlds().get(0);
Horse horse = (Horse) world.spawnEntity(new Location(world, 0, 128, 0), EntityType.HORSE);
horse.setCustomName("Spawn Point");
horse.setCustomNameVisible(true);
WitherSkull skull = (WitherSkull) world.spawnEntity(new Location(world, 0, 128, 0), EntityType.WITHER_SKULL);
skull.setPassenger(horse);
@jimmikaelkael
jimmikaelkael / mysql-batchSQLexecute.sql
Created October 29, 2011 15:28
A MySQL stored routine that executes chained SQL statements passed in parameter.
DELIMITER $$
/*
* This routine execute some SQL statements passed as parameter
* params:
* - sqlStatements(MEDIUMTEXT): the text containing all the SQL to execute
* - delimiter(VARCHAR 255) : the delimiter string between the SQL statements
* - autocommit(INT) : set wether auto-commit mode is used or not (0/1)
*
* The goal of this routine is too clearly improve the execution speed