Replacement of craftbukkit code